Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jsingh71
Partner - Specialist
Partner - Specialist

Load multiple excel file with different name but same structure.

Hi everyone,


I need to load multiple excel file with different name but same structure.

earlier I used following script and its working fine.

For Each File in 'First,'Second','Third'

Let vFileName = File;

Let vPath = '[//ABC..com/project/MDM9/Docs/CS'&vFileName&'.xlsm](ooxml, no labels, table is [Sheet_Name])';

Temp:

Load

*

FROM

$(vPath);

Next;

But now i want to load 20 files instead of three files which I load earlier, so please let me know is there any dynamic way to do this without giving the name of each excel file name in ForEach loop.

13 Replies
noman212
Creator III
Creator III

1please specify path as

load '.\\192.168.1.2\Sharing\Foldername';

jsingh71
Partner - Specialist
Partner - Specialist
Author

I only asked this question before that but any how I loaded files through sharepoint. As I mentioned my earlier reply that time I used file names in ForEach loop, now I want to do dynamically without giving the file names manually. So us there any way to do this?? If you suggest anything its really helpful for me.

Thanks..

Anonymous
Not applicable

Hi ,

Use this script if you can keep this set of files in separate directory:

FOR EACH FILE IN FileList('$(DIR)*.xls')

load .......

FROM

$(FILE)

(biff, embedded labels, header is 1 lines, table is Sheet1);

next FILE

if you are having other files also in the same directory, then you have to maintain a common suffix/prefix inorder to identify them. Accordingly syntax will change as follows;FOR EACH FILE IN FileList('$(DIR)Prefix*.xls')

Regards,

Venkat

Not applicable

Hi,

I have my QVD files in another server from where I use the script below:

for Each file in '\\10.xxx.xxx.32\d\Developer\Abhishek Sen\Deployment\QVD'

HotelApp:

load *

From $(file)\*.qvd (qvd);

(I just put 'x' to mask the digits in my IP address of the server).