Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
anushka_iconresources
Contributor II
Contributor II

Loading multiple files in Qlik Cloud

Hi Everyone,

 

I am trying to load multiple files in Qlik cloud using the following format from Sharepoint Connection

"FROM [lib://DEV:Office_365_Sharepoint - TEST/Datasource/Care/New Case/Listing/PatientListing*.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);"

File name is PatientListing_DDMMYYYY, and i would like to load all the files.

Can someone please suggest a way to load all these files at once.

Regards

 

Labels (2)
7 Replies
SunilChauhan
Champion II
Champion II

try with underscore

"FROM [lib://DEV:Office_365_Sharepoint - TEST/Datasource/Care/New Case/Listing/PatientListing_*.csv]
(txt, utf8, embedded labels, delimiter is ',', msq);"

 

or share the error message?

Sunil Chauhan
anushka_iconresources
Contributor II
Contributor II
Author

Still giving error with underscore
 
Cannot open file: 'lib://DEV:Office_365_Sharepoint - TEST/Datasource/Care/New Case/Listing/PatientListing_*.csv' (Connector error: Failed on attempt 1 to GET. (-2147024894, System.IO.FileNotFoundException, File Not Found.))
anushka_iconresources
Contributor II
Contributor II
Author

Still Giving error with underscore

Cannot open file: 'lib://DEV:Office_365_Sharepoint - TEST/Datasource/Care/New Case/Listing/PatientListing_*.csv' (Connector error: Failed on attempt 1 to GET. (-2147024894, System.IO.FileNotFoundException, File Not Found.))
sitemasdipac
Contributor II
Contributor II

Buenos Dias,

Por favor indicar si solucionaron esta novedad..

Gracias

anat
Master
Master

For each File in FileList('$(vFileName) & '\*' & '.csv')
   trace $(File);
   Load * From [$(File)] (txt, codepage is 28591, embedded labels, delimiter is ';', no quotes);
Next File

marksouzacosta
Partner - Specialist
Partner - Specialist

I don't think you can do that since this is not a regular Windows folder where you can use wild characters. 
You have to enter the names manually or I maybe there is some short of metadata feature where you can list the file names inside your SharePoint.

Read more at Data Voyagers - datavoyagers.net
TauseefKhan
Creator III
Creator III

Hi @anushka_iconresources 
Use a loop to iterate through the files.

// Define the file path
LET vFilePath = 'lib://DEV:Office_365_Sharepoint - TEST/Datasource/Care/New Case/Listing/';

// Loop through each file in the directory
FOR EACH vFile IN FileList('$(vFilePath)PatientListing_*.csv')
TRACE $(vFile);
LOAD
*
FROM [$(vFile)]
(txt, utf8, embedded labels, delimiter is ',', msq);
NEXT vFile;