Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
While loading files from Sharepoint, it works fine if I specify the file, but if I put a wildcard, I get an error of "Bad Zip File".
Here's an example:
The commented FROM, works fine.
But if I try with the not commented FROM, I got the error.
So anyone know why is this happening, and how could I do to upload all the files from a folder, instead of specify every file?
According to a post I've found, I tried changing the path to: '\\theshare.Xcompany.com\Week 3\*.xlsm', but it didn't work.
Thank you very much in advance for your help.
EDIT: Title corrected.
You're actually downloading and not uploading by using the LOAD ... FROM with a web-URL.... to be correct.
Wildcards are only supported in the FROM part if you are accessing a drive location and not when you are using the webfile feature (a URL).
So the way to go about it is that you can retrieve a SharePoint list of the files stored in the folder first and then you will have to create a loop in your load script to retrieve each of the files.
Hi Petter. Thank you very much for your answer and correction.
So regarding the list of the stored files, I had tried to do that as doing:
LOAD
FileName()
FROM [...Path].
But obviously it didn't work because I had to use a wildcard in order to get all the filenames.
So now the question is, how could I do to retrieve a SharePoint list of the files stored?
Thank you very much
Microsoft SharePoint API's have changed and evolved over time. Which SharePoint version are you interfacing with?
I'm working with the SharePoint 2010.
I don't thing the share point will support the wild card for file name...you need to use the loop method
Great. But how can I do to obtain the names of all the files of the folder?
In the script , go for web files and use URL where the excels are stored ..select the html mode > to the right you will see the tables in the format @1 , @2 go through each you will get the list of list here and then based on this go for the loop and reduce
Hope this helps you
Hey,
Thank you for your answer.
I tried this, but it appears to me this message:
Anyway, I also tried to replace the fields for @1, @2... like this:
Table:
LOAD
@1,
@2
FROM [https://theshare.Xcompany.com/sites/*] (ooxml, embedded labels, header is 8 lines, table is [OA-Quality])
And it didn't work.
I also tried with:
Table:
LOAD
A,
B
FROM [https://theshare.Xcompany.com/sites/*] (ooxml, embedded labels, header is 8 lines, table is [OA-Quality])
And also it doesn't work.
Thank you anyway for your answer.. and any other possible solution is welcome.
Hi Mateil,
did you get an answer to this issue, i also had similar requirement , can you help?