# Microsoft Excel

## Why is the wrong row being updated/deleted?

Due to limitations with Microsoft's API, rows can only be identified by row number.

If you have a complex workflow that uses multiple Excel actions and references a previous step, it's possible that the row reference now points to a different, unexpected row, because the structure of the worksheet has changed and the row numbers are now different.

Also, if another process or person makes external modifications to the worksheet while a Relay.app run is happening, this may also cause an unexpected row to be updated.

For best results, limit the number of actions that *modify* a worksheet to one per Relay.app workflow (usually, the `Create or update a row` action can be used to achieve what you need).

## How do I change the detected column type?

### How does Relay.app infer column types in Microsoft Excel?

As Microsoft Excel doesn't have native types for columns, Relay.app infers the data type for each column based on a combination of the header names of that column and the values in the row under the header.

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-c1a608632a903291dd39350bdb0314b85a187147%2Fimage.png?alt=media" alt="" width="563"><figcaption><p>Relay.app infers data types for the columns based on the header and values in the first row</p></figcaption></figure></div>

The column structure depicted above is inferred as follows in Relay.app:

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-458271b068c7e77a7ebd23153cef34c9691a73a7%2FCleanShot%202025-09-05%20at%2012.45.49%402x.png?alt=media" alt="" width="563"><figcaption><p>To force-refresh the inferred column types, click the little 'refresh' icon</p></figcaption></figure></div>

### Updating inferred column types

To update the inferred column types, add (or change) the header or first data row for a column, and click the 'refresh' icon or 'Refresh data' from the overflow menu of a Step. **After the column type has been re-inferred, you can revert these changes.**

<div align="left"><figure><img src="https://647519108-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXkKoEy3xMIYaIwd4mRAB%2Fuploads%2Fgit-blob-e6260ed4bed4c1f21a1247cdc273fac7870c87db%2FCleanShot%202025-09-05%20at%2012.49.29%402x.png?alt=media" alt="" width="284"><figcaption><p>Generic way to refresh columns/data: click 'Refresh data' in the overflow menu of a Step</p></figcaption></figure></div>

## Why didn't my "New row added" trigger pick up on a new row?

For Relay.app to detect a row as new, the row has to have previously been empty, then set to some value(s).

If all of the data in a row is completely replaced, Relay.app won't be able to detect that the row is new, even if all of its cells have been updated.

## Why can't I find my Excel workbook?

If the Excel workbook you need isn't coming up in search, try a few things:

1. Confirm you're connected to the right Microsoft account: The account listed in the `Run as` menu should match the account with access to the file.
2. If it's a shared file, try moving or adding the file to `My Files`; Microsoft's API often omits files that are part of a shared drive.
3. Reauthorize access to your Microsoft account: Go to your `Apps` page and reconnect the Microsoft Excel app to force Microsoft to refresh permissions.<br>
