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

concatenate different (excel)

Hi,

how to concatenate different sheets with different field names, see example below.

SHEET1

     Item code, Description, Color, Price

SHEET2

     Item Code, Size, Price

-Consider that this SHEET1 and SHEET2 is in one excel file.

Please help. Thanks.

Best Regards,

Bill

3 Replies
Not applicable
Author

Hi brillringer,

ok you have two diffrent sheets of excel and you want to concatenate two tables

which are having almost same fields, In qlik view you can do something like this.

Tablename:

load

      Item code,

      Description,

      Color,

      Price,

    'sheet1' as Flag

from sheet1.xls;

concatenate

load

      Item code,

      Description,

      Color,

      Price,

    'sheet2' as Flag

from sheet2.xls;

Thanks

Anant Dubey

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this,

TableName:

LOAD

     Item code,

     Description,

     Color,

     Price,

     'Sheet1' AS SheetName

FROM ExcelFile;

CONCATENATE

LOAD

     [Item Code],

     Size,

     Price,

     'Sheet2' AS SheetName

FROM ExcelFile;

Regards,

Jagan.

Not applicable
Author

Actually, the number of sheets is indefinite (no exact number of sheets) so scripting should be dynamic. It could be 2 sheets or 5 sheets or 10 sheets.

Thanks.