Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load and stack data from an excel file

Hi,

I would like load data from several excel tables. All the tables have the same structure (fields) but each one is in one tag. I would like to stack all the rows from all the tables into only one table adding a field to distinguish from which original table tag were the row loaded.

To make it short, I don't know how to load from excel neither how to stack several excel tags in one.

Any clue please?

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See here. Post 2 and 8 are probably what you're looking for. If you need to loop through excel files in a directory tree, see here.

You can add $(vSheet) as SheetName to create a field to store the sheet name:

for vSheetNo = 1 to $(vMaxSheet)

     Data:

     LOAD *, $(vSheet) as SheetName

     FROM $(vFileName)

     (biff, embedded labels, header is 1 lines, table is $(vSheet));

next


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

See here. Post 2 and 8 are probably what you're looking for. If you need to loop through excel files in a directory tree, see here.

You can add $(vSheet) as SheetName to create a field to store the sheet name:

for vSheetNo = 1 to $(vMaxSheet)

     Data:

     LOAD *, $(vSheet) as SheetName

     FROM $(vFileName)

     (biff, embedded labels, header is 1 lines, table is $(vSheet));

next


talk is cheap, supply exceeds demand