Hi all,
I try to create flow with following condition:
Step 1: Copy file in Sharepoint: from file demo1 to demo2.
File demo2 is created after triggering this condition.
Step 2: Initialize variable
Step 3: Get the table from the new created file (demo2)
In step 3, I always get the error
Hi @ShadowKnight ,
Using "Path" instead of variable might solve the issue. I mean store the path of the demo2.xlsx in the variable and use it in Get Tales.
Let me know if thet works.
Regards,
Gowtham
Hi @GowthamR
Could you please explain a bit more on it since i'm just beginner on MS Flow 🙂
You mean to make the change in step 2.
How to store the 'path' of created file? Please help
Hi @ShadowKnight ,
On second though, you don't need a variable at all, You can select the file by clicking the Folder Icon in the file and you should see all the available Excel files.
A known issue in the Excel connector is that you cannot variabalise the file name/ path and refer to it to extract any data. This is a limitation with the connector and you have to refer to the files by clicking on the folder icon and map the file and for the List Rows action : choose the table from the dropdown only.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @yashag2255 & @GowthamR,
I understand that it's workable to select the specific file in step 3: Get table. However, in this scenario, this file (demo2) is not created until step 1 is triggered. That's why I'm unable to locate it in step 3.
So if there's any workaround or something wrong with this logic, please help to advise
Can you try and follow the logic as per the link and where the temp.text is replaced with '' you replace it with "demo2.xlsx" and then you can use that as the path get tables.
Let me know if this helps.
As i have mentioned in the previous post, the file cannot be selected dynamically in the Excel action as this is a limitation of the excel connector. At the moment, you can get to files that are already present on the library and not the ones that you are creating in the flow itself. The workaround suggested in the other reply might work for other files but definitely not for EXCEL.
Hope This Helps!
Could you share some documents about it: it's unable to select dynamically the Excel file due to excel connector's limitation, since it's quite limited resource here. Thank you.
You might want to look at this blog post below:"
http://johnliu.net/blog/2019/5/workarounds-needed-to-use-the-excel-connector-in-microsoft-flow
And this thread too:
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
You are right, I tested it and it fails.
And in that process, it locked an excel file and now I cant delete it, any idea how I can delete it?
I had a test flow that ended after get tables from a excel online file.
I can't delete it now.
Appreciate any help on this.
So how it works is, on SP the file when you are accessing to run CRUD (create read update delete) operations, it checks out in lock mode so that the data is properly handled. Can you try the method shown here for deleting the file:
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @yashag2255 ,
Thanks for your reply.
The method in the link didn't work for me as I couldn't see the file in Manage files section.
However, I could delete it after leaving it overnight. 🙂
Regards,
Gowtham
HI @GowthamR
Cool. Maybe the file was checked out for the flow runtime.
Were these responses helpful in addressing your query?
If this question/query is ressolved, please mark as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Hi @ShadowKnight ,
Many thanks to the instructions provided by @yashag2255 and the method of dynamically populating the Table name using expression and dynamic content. This is great!
In addition, the Excel file is locked because the execution of an action in Flow checks out the file, so other actions cannot operate on the specified file in a short time.
We need to wait for the file to be automatically checked in before we can perform other further operations on the file.
If the file is stored in the SharePoint Library, you might consider using Check in file action to check in the specified file.
Best Regards,
Hello,
You can do that. You can get an excel file by having a text name.
Here is how:
Instead of your variable, get the list of files from the location you are copying the file to.
Then you go through the list of files and if the file name matches the file name you are looking for then grab the tables using the file identifier.
If you don't know your destination folder either you could loop through all your destinations to find the file you just copied.
That is if you don't have hundreds of sharepoints.
Here is my example:
In your case, comparing the file name might require using regular expression so you can strip out the file name from your uri.
I don't know what is available with the send HTTP sharepoint action.
So the example goes through all the files in the location then when the name contains the text name I use the current item's Identifier to open the excel file to get the tables.
Note that name content does not include extension. For more details you could look at the output "get files properties only" to find what to match.
There are different content items though that have the file name and even the extension, just depending on what you need.
My run
User | Count |
---|---|
26 | |
15 | |
14 | |
10 | |
10 |
User | Count |
---|---|
45 | |
29 | |
29 | |
23 | |
22 |