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

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{{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{{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
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
1,325 questions
Microsoft Graph Workbooks API
Microsoft Graph Workbooks API
A Microsoft API that allows web and mobile applications to read and modify Excel workbooks stored in OneDrive for Business, SharePoint site or Group drive.
66 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Shivam Dhiman 5,771 Reputation points


    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.

    0 comments No comments

  2. 96 Reputation points

    @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.