Help
I have a flow that uploads an Excel Sheet into a SharePoint document library, then it is supposed to read the file and import the rows in it into a SharePoint list. The excel table has only one column. The filename is unknown at build time, so it is a dynamic field.
After creating the file as shown in the image I DELAY for about a minute, then I use the "List rows present in a table" action, which calls the file name as given in the "create file" SharePoint action. as shown in screenshot below
However my flow is failing on this stage, as it gives the error below.
{
"status": 400,
"message": "The parameter 'file' has an invalid value '/CodesUploadTest4.xlsx'."
}
The error as shown below.
The flow works perfectly fine if I don't use dynamic values for the file name, sadly it is not practical for me to use static names.
How best can I dynamically read an Excel Sheet and add its rows into a SharePoint Online List? I have checked the file names for accuracy, and all looks very correct as far as the values being dynamically passed into the above action.
Solved! Go to Solution.
Hi @tnshr,
The file field in the List rows present in a table action should append the file identifier of the new created file, so you should add a Get file properties action after Create file. Then use Get tables action to get table IDs, steps are below:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @tnshr,
The file field in the List rows present in a table action should append the file identifier of the new created file, so you should add a Get file properties action after Create file. Then use Get tables action to get table IDs, steps are below:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-litu-msff thank you very much, the solution worked fine.
However, it seems to lock the file in SharePoint so that no one can overwrite the file or edit it afterwards.
The file https://mytenant.sharepoint.com/sites/SomeSite/VoucherUploads/CodesUploadTest2.xlsx is locked for shared use by me@mytenant.com [membership].
clientRequestId: 626***
serviceRequestId: 626***
This error comes up when I try to upload another file with the same file name as my last upload, which I am expecting my users will likely do. Is there a way out of this one, or I have to just make sure all filenames are unique?
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
128 | |
53 | |
38 | |
26 | |
21 |