Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load multiple excel files with different sheet names

Hello,

I want to load different excel files (one for each month), that have the same structure and similar name. I want to use the same load statement, i can do it with no problems using a wildcard for the excel name, but my problem is with the sheetname as it is different for each file.

Is there a way to use a wildcard in the sheet name?

Regards.

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you can just leave the sheet name off and it will default to the first sheet.

(ooxml, embedded labels);

-Rob

http://masterssummit.com

http://robwunderlich.com

View solution in original post

7 Replies
marcus_sommer

If it is always the same sheet-position you could use:

(biff, no labels, header is 1 lines, table is @4)

If not you could use a for loop and creates for every loop a variable:

(biff, no labels, header is 1 lines, table is '$(vSheet)')

- Marcus

Not applicable
Author

Hi,

It is always the same position for the sheet (the first one as there is only one sheet) and for every column, the only change is the name of the Sheet.

The first option seems to be the solution, I tried but i get an error (Cannot read BIFF file).

The excel structure is as this: (its an xlsx)

excel.JPG

thanks and regards.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Can I suggest you replace the date part or whatever differentiat your file everymonth with asteric (*). as in

FROM

[.....\New_Professions_full_data_set_01/08/2013.xlsx]

(ooxml, embedded labels, table is Health);

with

FROM

[.....\New_Professions_full_data_set_*.xlsx]

(ooxml, embedded labels, table is Health);

Let me know if this helps

Best Regards,

Gabriel

Not applicable
Author

Hi,

The problem is that I can not change anything in the Excel files, they are created automatically by another process not related to me.

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

I supose you can change thing in QlikView.

The script above is in QlikVIew.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I think you can just leave the sheet name off and it will default to the first sheet.

(ooxml, embedded labels);

-Rob

http://masterssummit.com

http://robwunderlich.com

Not applicable
Author

That's it, it is always the simpler solutions that work.

Thanks.