Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ivandrago
Creator II
Creator II

Loop through excel, add file,sheet name to table and store as QVD

Hi,

I have the attached QlikView Document and Spreadsheets.

I want to loop through each spreadsheet and create a final QVD with all the data in one QVD, I also want in the final QVD two extra columns where one Column Name has the File Name of the spreadsheet and the other Column Name has the Sheet Name of Excel it is looking at.

Thanks

1 Solution

Accepted Solutions
adityaakshaya
Creator III
Creator III

Hi Ivan,

Please use the below code. It will help you to save the file in the desired location

Let vPath = 'C:\Qlikview\02_QVD\';

Table:

LOAD Tables

FROM

(ooxml, embedded labels, table is Tables);

Store Table into $(vPath)Table.qvd(qvd);

View solution in original post

3 Replies
jwjackso
Specialist III
Specialist III

The sheet name is hardcoded in the " (ooxml, embedded labels, table is Tables)", try the changes below.

for each File in filelist (path_Alles)

      AllDataTables:

      LOAD *,

                 FileBaseName('$(File)') as FileName,

                 'Tables' as SheetName;

      LOAD       *

      FROM $(File)

      (ooxml, embedded labels, table is Tables);

//Store AllDataTables into a QVD in the location C:\Qlikview\02_QVD and call this AllDataTables.qvd

next File

ivandrago
Creator II
Creator II
Author

Thanks for your help so far, how do I store the QVD into the location C:\Qlikview\02_QVD\

adityaakshaya
Creator III
Creator III

Hi Ivan,

Please use the below code. It will help you to save the file in the desired location

Let vPath = 'C:\Qlikview\02_QVD\';

Table:

LOAD Tables

FROM

(ooxml, embedded labels, table is Tables);

Store Table into $(vPath)Table.qvd(qvd);