question

ffbld01ukibmcom-1577 avatar image
0 Votes"
ffbld01ukibmcom-1577 asked saldana-msft edited

Is there any Graph API to get the rows from excel worksheet with some filter on column values?

We are using Graph API for one of our excel-based applications. Currently, we have planned to use range API to retrieve the values for specific excel rows. Our queries are like following https://graph.microsoft.com/v1.0/me/drive/items/{ {ITEM_ID}}/workbook/worksheets/{ {worksheet_id}}/range(address='A1:Z100') which works. But now we want to add some filters in the query like we want to query any row that has a value for A=1234 but when we tried adding such filter on the URL, it says bad request. Look at the following query https://graph.microsoft.com/v1.0/me/drive/items/{ {ITEM_ID}}/workbook/worksheets/{ {worksheet_id}}/range(address='A1:Z1')?$filter='A eq 1234'

Could you suggest to us any API that can achieve the above use case?

microsoft-graph-generalmicrosoft-graph-workbooks
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShivamDhiman-1582 avatar image
0 Votes"
ShivamDhiman-1582 answered

Hi @ffbld01ukibmcom-1577

Based on my test filter query parameter only works with the collection of the result.
The range that your are using in your query is not a collection. As per documentation only these properties are available for range. There is no property available where you can directly use filter clause to get particular value of cell.

Hope this helps.

If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ffbld01ukibmcom-1577 avatar image
0 Votes"
ffbld01ukibmcom-1577 answered ZehuiYaoMSFT-7151 edited

@ShivamDhiman-1582 thanks for the quick reply. Could you please share any API that might allow us to filter the rows based on a column value? FYI I know one such API which as per the documentation should work on tables, here is the documentation . But in our tests it did not work either, could you at least share one working payload for this API that shows the filter over column value, because the documentation does not have any payload for the API.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @ffbld01ukibmcom-1577

You can refer to this similar case

Hope this helps.

If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

0 Votes 0 ·

Hi @ffbld01ukibmcom-1577, did you refer to the answer above? Is it helpful to you? Comment here when you still need any help

0 Votes 0 ·