Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
gwassenaar jagan swuehl tresesco msolomov
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
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;