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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MEDHA07
Contributor III
Contributor III

Reading Multiple Excel files along with table names using loop statement

FileList:
LOAD * INLINE [
    FileName, TableName
    REGION.XLS, REGION$
    DIVISION.XLS, DIVISION$
];


FOR i = 0 TO NoOfRows('FileList') - 1

    LET FileName = peek('FileName', i, 'FileList'); 
    LET TableName = peek('TableName', i, 'FileList'); 

    div_reg_table:
    LOAD
        *
    FROM '$(FileName)'
    (biff, embedded labels, table is '$(TableName)');

NEXT
Labels (1)
1 Reply
rubenmarin
MVP
MVP

Hi, is this a question or  hint? If it fails it migh be because if the excel is in another folder of the QVW it will need the path for the excel.