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: 
Not applicable

hi

can any one explain how to load multiple excel files in single script ? take  one scenario .

Labels (1)
3 Replies
Not applicable
Author

Hi

try this

for Each vMonth in 'Jan','Feb','Mar','Apr','May','Jun'

  Data:

  LOAD ID,

      State,

      '$(vMonth)' as Month,

      Sales

  FROM

  SALES_M.xlsx

  (ooxml, embedded labels, table is $(vMonth));

NEXT vMonth

here:

in your xl sheet names like jan ,feb,mar ......

change the names based on ur sheets

jagan
Partner - Champion III
Partner - Champion III

Hi,

If all the files are of the same format ie., same columns then try like this using wildcard characters.

Data:

  LOAD

     *,

FileName() AS SourceFile

  FROM

  *.xlsx

  (ooxml, embedded labels, table is Sheet1);

Hope this helps you.

Regards,

Jagan.

Anonymous
Not applicable
Author

Hey,

you may try this to load files from a same folder with similar structure:


For each file in FileList('C:\Users\chinna\Documents\QlikView\*')

    TEMP_FILE:

    LOAD

*,

        subfield('$(file)','\',-1) as filename,

        FileTime('$(file)') as Date_file autogenerate 1;

Next;


BR,

Chinna