Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading files from Sharepoint with wildcard

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:

Capture.PNG

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.

9 Replies
petter
Partner - Champion III
Partner - Champion III

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.

Anonymous
Not applicable
Author

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

petter
Partner - Champion III
Partner - Champion III

Microsoft SharePoint API's have changed and evolved over time. Which SharePoint version are you interfacing with?

Anonymous
Not applicable
Author

I'm working with the SharePoint 2010.

avinashelite

I don't thing the share point will support the wild card for file name...you need to use the loop method

Anonymous
Not applicable
Author

Great. But how can I do to obtain the names of all the files of the folder?

avinashelite

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

Anonymous
Not applicable
Author

Hey,

Thank you for your answer.

I tried this, but it appears to me this message:

paraQLIKVIEW FORO.PNG

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.

meashok07
Contributor
Contributor

Hi Mateil,

 

did you get an answer to this issue, i also had similar requirement , can you help?