# 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="/files/wTgponeNgPrnUub4rrnt" 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="/files/4HMMjHuPCWjZXK3flK6D" 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="/files/09vrMIfhyFAh2mnkcTUe" 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.relay.app/app-specific-faqs/microsoft-excel.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
