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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Append from multiple tabs

Hi,

gwassenaarjaganswuehltresescomsolomov

I need to append data from multiple tabs in excel into a single file, the field names are the same, attaching the sample file with 3 tabs. Final output should have 9 names with 9 SSOs.

Can anyone guide me on how to do that?

Thanks

Sunny

10 Replies
giakoum
Partner - Master II
Partner - Master II

it is easier than I thought . The code below works reading directly from your excel provided you have the excel odbc driver installed. Try it :

ODBC CONNECT32 To [Excel Files;DBQ=C:\Users\G96893\Desktop\Append Test.xlsx];

    

SheetsTemp:

SQL TABLES;

DISCONNECT;

    

Sheets:

First 1 LOAD

  Concat(Chr(39) & PurgeChar(TABLE_NAME, '$''') & Chr(39), ',') as SheetConcatenated

Resident SheetsTemp;

LET vSheetConcatenated = FieldValue('SheetConcatenated', 1);

for Each vSheet in $(vSheetConcatenated)

data:

LOAD Emp,

     SSO

FROM

(ooxml, embedded labels, table is [$(vSheet)]);

NEXT

DROP Table SheetsTemp;

DROP Table Sheets;