Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
John-SSI
Contributor III
Contributor III

Pick a file on Sharepoint

Hi,all

i have a connection to sharepoint and the file got new date evryday.

So is there a function in script to take the Filename_*.xlsx

I know i can doit when the file is on Cloud, but it's not seems to work from shares.

Labels (2)
5 Replies
steeefan
Luminary
Luminary

If you use Qlik Web Connectors to connect to your O365 SharePoint, you can use the ListFiles operation which returns all files in a given folder. On that list, you can the filter and get all the files matching the required pattern.

John-SSI
Contributor III
Contributor III
Author

Hi, i use Qlik Sense Office365 connector. Works with that to?

steeefan
Luminary
Luminary

In that case, it's even easier. Just use FileList():

FOR EACH vFile IN FileList('lib://Office 365 SharePoint/Shared Documents/General/Filename_*.xlsx')

  TRACE $(vFile);
    
NEXT vFile;

 I somehow can't get it to work right now but that's the usual way of reading all file names in a folder.

John-SSI
Contributor III
Contributor III
Author

Aha, i get this:
Connector error: Failed on attempt 1 to GET. (-2147024894, System.IO.FileNotFoundException, file not found.)

steeefan
Luminary
Luminary

It seems that the data connection using the Office 365 SharePoint connector is not configured correctly.