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: 
MT4T
Creator
Creator

Script for load from file list

Hello,

I have an issue with loading multiple files from SharePoint library.

I need to load multiple xlsx files with same structure from sharepoint and make an compilation from them.

My script bellow:

LET vEXCEL_LOC = 'lib://DA_CONNECTORS:05_BUSINESSPLANNING/Shared Documents/03_Sales Plan/03_WEEKLY_FC_REPORT/ARCH';

For each vEXCEL_FILE in filelist ('$(vEXCEL_LOC)/*.xlsx')

Trace $(vEXCEL_FILE);

Next vEXCEL_FILE

It shows error relating to my path but I do not see reason.

MT4T_0-1666861479966.png

Can You help?

Labels (2)
3 Replies
RsQK
Creator II
Creator II

Hi, try like this:

SET g_path_data = 'LIB://DATA';

FOR EACH v_file IN FILELIST('$(g_path_data)/*.xlsx')

TRACE --------------- v_file = $(v_file);

NEXT v_file;

You will need to adjust the variable "g_path_data" with your file location.

I generated 10 excel files in this folder, the trace I'm seeing with this script is:

RsQK_0-1666880462766.png

 

RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @MT4T 

if im not wrong, you are using Qlik Sense Cloud.

you have a lib connection call 05_BUSSINESSPLANNING and it is trying to use that connection that should exists in space DA_CONNECTORS.

if so, i guess you move your app from one space to another and you are missing the connection.

 

Hope this helps.

Best,

Help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 😁

MT4T
Creator
Creator
Author

Hi,

I have checked both solutions.

Fixed script according to RsQK.

And checked connector as you are suggesting. 

Still not working

When I am connecting to a direct file with path like this:

[lib://DA_CONNECTORS:05_BUSINESSPLANNING/Shared Documents/03_Sales Plan/03_WEEKLY_FC_REPORT/ARCH/SCEP_ALL_AN_WEEKLY_FC_REPORT_20220203.xlsx]

It works. Problem is most likely in selected path which is marked with italic bold.