Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
fmazzarelli
Partner - Creator III
Partner - Creator III

Import File .xls: more sheets

hi,

a xls file is composed of more sheets.

Could I append data  into a single table?safac1.png

1 Solution

Accepted Solutions
Not applicable

here is a FOR EACH example

FOR EACH vSheet IN 'GENNAIO', 'FEBBRAIO', 'MARZO', 'APRILE', 'MAGGIO', 'GIUGNO', 'LUGLIO'

Table:

LOAD

....

FROM [<FileName>]    (ooxml, embedded labels, table is [$(vSheet)])

;

NEXT

Chris

View solution in original post

7 Replies
Not applicable

Hi Fabio,

Yes you can

FOR EACH vTab IN GENERO, FEBRERO, MARZO  ....

T:

load * from table (...... , $(vTab));

NEXT

best regards

Chris

fmazzarelli
Partner - Creator III
Partner - Creator III
Author

HI

could you suggest me the correct form?

FOR EACH vTab IN GENNAIO, FEBBRAIO, MARZO, APRILE, MAGGIO GIUGNO, LUGLIO

CrossTable(Prodotto, Quantità, 4)

LOAD *

FROM

(ooxml, embedded labels, table is GENNAIO, filters(

Remove(Row, Pos(Top, 2)),

Remove(Row, Pos(Top, 531)),

Remove(Row, Pos(Top, 530)),

Remove(Row, Pos(Top, 529)),

Remove(Row, Pos(Top, 528)),

Remove(Row, Pos(Top, 527)),

Remove(Row, Pos(Top, 525)),

Remove(Row, Pos(Top, 523)),

Remove(Row, Pos(Top, 522)),

Remove(Row, Pos(Top, 523)),

Remove(Row, Pos(Top, 522)),

),  $(vTab));

NEXT

Not applicable

i would suggest you load first raw data in one tmp table and then do your transformation into a final table

Chris

fmazzarelli
Partner - Creator III
Partner - Creator III
Author

hi,

could I have an example?

Not applicable

here is a FOR EACH example

FOR EACH vSheet IN 'GENNAIO', 'FEBBRAIO', 'MARZO', 'APRILE', 'MAGGIO', 'GIUGNO', 'LUGLIO'

Table:

LOAD

....

FROM [<FileName>]    (ooxml, embedded labels, table is [$(vSheet)])

;

NEXT

Chris

fmazzarelli
Partner - Creator III
Partner - Creator III
Author

Houston Houston we have a problem...

Sheets have the same name of column.

------------------------------------

gennaio

column: Name

------------------------------------

febbraio

column: Name

------------------------------------

marzo

column: Name

------------------------------------

using crosstable I must have unambiguous name.


Any suggest?

Not applicable

hi Fabio,

Give to the table the name of $(vSheet):

use "noconcatenate"

and at the end of the 1st FOR EACH...NEXT,  do a second to concatenate all table into a single one

enjoy it

Chris