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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dyanamic load of excel files from folder

We are following a manual process to load excel files from a folder every month. I have to make it automated. I need to load new excel file from that folder and append to the last months data....So basically I need to have history of files for all previous months and if a new excel file is added in that folder I need to load that dynamically with the QVW reload. The excel file is added monthly once and with different filenames.....How can I make it automated, the excel file does not have any date field to filter....Thanks

1 Solution

Accepted Solutions
alexandros17
Partner - Champion III
Partner - Champion III

let path_Alles = 'C:\FileName*.xlsx';

for each File in filelist (path_Alles)

     
AllData:

     
LOAD * FROM $(File) (ooxml, embedded labels, table is Display);

next File

View solution in original post

18 Replies
alexandros17
Partner - Champion III
Partner - Champion III

let path_Alles = 'C:\FileName*.xlsx';

for each File in filelist (path_Alles)

     
AllData:

     
LOAD * FROM $(File) (ooxml, embedded labels, table is Display);

next File

Not applicable
Author

I am using your code and just changed Path_Alles   but its not working....Can you please check it....

I am getting error as       File .\extdata.cpp,Line 1832

                                            AllData:

                                            Load * from C:\Test\IT_SEP.xlsx (ooxml, embedded labels, table is Display);

let

path_Alles = 'C:\Test\*.xlsx';

for each File in filelist (path_Alles)

     
AllData:

     
LOAD * FROM $(File) (ooxml, embedded labels, table is Display);

next File

alexandros17
Partner - Champion III
Partner - Champion III

The code LOAD * FROM $(File) (ooxml, embedded labels, table is Display); is an example

you have to use "Table Files" and load your file.

Not applicable
Author

Sorry, I am not Clear.....Let us take an example, If  I have Name and Id as fields in my excel files

Load

Name,

Id

from

$(File) (ooxml, embedded labels, table is Display);

Is this what you want me to do?

Thnx

alexandros17
Partner - Champion III
Partner - Champion III

Hi,

in the script side, you have a button marked as "TABLE FILES", press it, then select your file xls, you will be guided, you can choose labels embedded and so on, then click finish, the script to load the file will be included in your document.

now you have to reload all data ...

Let me know.

Not applicable
Author

I have 4 xls files and they ll be coming every month.....if I select 1 xls how ll I get all the months data....As you suggested I loaded 1 xls file so i had only 1 month of data....Now if the folder is updated with the new xls file how should I reload it.

Thanks

alexandros17
Partner - Champion III
Partner - Champion III

I suppose that all the 4 files have the same structure, so the script to load the file is correct and the cycle for next will load all files in the directory

Anonymous
Not applicable
Author

Hi 447.....,

   it is possible to provide a sample excel file in month wise ,i will give script for that one.

Regards

Not applicable
Author

Please find the attached files