Just realised that @Jia2 was replying to a rather old issue 😅 ... not to worry, this still stands.
Yo, y'all (@Anonymous, @Anonymous, @edu, @Jia2, and @tahneelperry ), you need to run a Graph HTTPS request to get the Excel data, as I demonstrated here.
That will provide you with the used cells on a given sheet, which you can then turn into a table, then you can extract the data from the table.
However, it's actually easier than all that. Because if you use the HTTPS request that I provided to the user there (they were quite steadfast in not wanting to use it 😅) it actually returns the data that would be returned from a table, just possibly without defined keys/headers/field names.
Here is an image from that untaken ( 😓 ) solution:
If you know for sure that:
- One excel file is sent with each email.
- Only the first worksheet is used in that file.
... then you can:
- Use a Create file action to make the file on your OneDrive in the root folder.
(you will delete it at the end!)
- Run a Get worksheets action on the file you just made.
- Place a Send an HTTPS request to Graph directly after the Get worksheets action, not in a loop.
(no Apply to each)
Then the following in the URI is much more simple:
https://graph.microsoft.com/v1.0/me/drive/items/@{last(split(outputs('Create_file')?['body/Id'], '.'))}/workbook/worksheets/@{encodeUriComponent(outputs('Get_worksheets')?['body/value'][0]?['id'])}/usedRange
|
This will actually provide all the data that is usually inside a call for data from a table, I just don't remember if it formats those column headers.
(the Id from the Create file action is DRIVE_ID.FILE_ID, so you need to split it on '.' to take the second/last() value)
But if you really want headers, etc, then make a table from the returned range value. 😉
You can then delete the file at the end of the flow!