Hi Folks,
I am creating a file in a document library after fetching it from list item attachment. File type is excel. I want to read the same excel file using power automate for further process. File template is same in all cases.
Please suggest how can I do this .
Hi @rsaikrishna ,
I can understand that excel connection can not take dynamic path.
Can I update my excel (eg Book1.xslx) which is stored in a library with dynamic content after getting excel attachment content from list item and each time use the same excel for reading.
Please suggest.
Hi @Meshare ,
Glad that helped!
In order to interact with the data in the workbook, you'll need to use the appropriate actions from the Excel Online (Business) connector. For example you can use the "Get a row" action to read out the cells of a row out of a table then you can do calculation based on those cells in the succeeding actions.
Below is a simple example that reads one row from a table of my workbook and adds up the numbers from two of the cells.
Here is the sample table:
Name | Value1 | Value2 |
Apple | 1 | 4 |
Banana | 2 | 5 |
Cherry | 3 | 6 |
Here is the sample flow that reads a table row from a newly created workbook and adds up the numbers from two cells, then sends the result (in my case, "Result = 5") through the mobile notification.
The expression used to calculate the result (in the mobile notification action) is:
add(int(outputs('Get_a_row')?['body/Value1']), int(outputs('Get_a_row')?['body/Value2']))
I would suggest you read a bit more on how to use the Excel Online (Business) connector in Power Automate. There're a bunch of good articles out there on the internet. For example:
* https://piyushksingh.com/2020/07/06/power-automate-read-excel-file/
* https://medium.com/@anoopt/different-ways-of-getting-excel-data-using-power-automate-e21292b1d02a
You can also search up in this forum to see many great suggestions/tips contributed by the community.
Hope this helps!
Yutao
Hi @Yutao ,
I am able to get worksheets as per your solution now I want to read tables from worksheets and perform calculation on it's cells . Can you please guide me how can I achive this further.
Hi @Meshare ,
This seems to be working for me:
I used the "Create file" action to create the workbook (whose content was retrieved from a SharePoint list attachment). Then I passed the "Id" property from the "Create file" action to the Excel Online (Business) action (in my example, reading all the worksheets out of the workbook).
Hope this helps!
Yutao
Excel actions does not accept dynamic path of the Excel files.
All the excel files should have .xlsx file extension and also the data should be in a table in the Excel file.
You can use below blog to read the excel file dynamically:
https://manueltgomes.com/microsoft/powerautomate/how-to-access-dynamic-path-excel/
Regards
Krishna Rachakonda
If this reply helped you to solve the issue, please mark the post as Accepted Solution. Marking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone. |