
Announcements
Hello,
is it possible to edit a excel file if I have created this before and moved it to a folder?
I tried it but always fail at the point that I don't know which file to access. If I go over dynamic content and click on the path there, it doesn't work.
These are my steps right now. I create an Excel table and would like to add something there
I'd be glad to get help again.
Thanks!
Hi @theresa0501 ,
You probably won't be able to access the file by path, but you can get this path to use as dynamic content in your the action where you will interact with the table. To achieve it, use the 'Get file properties' action and enter the 'ItemId' dynamic content from your 'Move file' action into the Id input:
After that, you will have access to the 'Full path' property from the moved file, as you can see in the raw outputs:
Now you can integrate this property into an expression to use it in the action where you will access the Excel table. The expression will probably looks like outputs('Get_file_properties')['body']['{FullPath}']
If you need any help when writing this expression, please share the name of your 'Get file properties' action in your end. Also, if you are not comfortable with the use of raw outputs, check this article: http://digitalmill.net/2023/06/29/how-to-access-the-raw-outputs-in-power-automate/
Have in mind that you also will need to perform a similar task with the Excel table, as Power Automate won't be able to identify it automatically. To achieve it, you can use a 'Get tables' action passing your moved file path as dynamic content (with the same process mentioned above) and then filter the 'Get tables' outcome by the table name that you need. In the example below, I'm returning all tables from a file and isolating only that one called 'managers':
And after that using this table 'Id' dynamic content in a 'List rows present in a table' action. You may notice that this process will automatically generate an 'Apply to each loop' even when you are handling only one table: don't worry, it happens because this single table is still stored into an array and needs to be looped.
Let me know if it works for you or if you need any additional help!
-------------------------------------------------------------------------
If this is the answer for your question, please mark the post as Solved.
If this answer helps you in any way, please give it a like.