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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

For loop while reading from Excel file

Hello Everyone,

I  am new to qlikview. I have a question for which I couldn't find a solution.

Can someone help me?

The problem statement is:

I have a folder in a FTP server, which contains excel files. More specifically every quarter there will be a new file with the "year-quarter" as the file name.

Again every file has 3 sheets.

My tasks is to read all the excel files, and store the data from sheet1 from all excel file in a qvd. And this has to repeat for sheet2 & sheet 3 as well.

Thanks,

Spandana

Labels (1)
1 Reply
fosuzuki
Luminary
Luminary

Hi Spandana,

this should be very straighforward when doing it with QlikView, as long as every file has the same internal structure:

LOAD *

FROM FilePath\*.xlsx (ooxml, embedded labels, table is Sheet1);

LOAD *

FROM FilePath\*.xlsx (ooxml, embedded labels, table is Sheet2);

LOAD *

FROM FilePath\*.xlsx (ooxml, embedded labels, table is Sheet3);

The first load statement will get the data from the Sheet1 from all files. The second from the Sheet2, and so on. If all files / sheets have the same data structure, QlikView will automagically concatenate the data in the same table.

Hope this helps you.

Regards,

Fernando