Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Excel Data Transformation

HI Friends,

I have attached the sample data in excel. I would need your help/suggestion on how this data can be loaded into qvw as 2 tables.

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

We need to exclude the header names (Column11, Column 12 and Column 13) in table 2. So the above syntax checks the column1 whether any cells contains "Column*" and  excluds that specfic row.

View solution in original post

14 Replies
Kushal_Chawda

What is expected output you need?

tamilarasu
Champion
Champion

Hi Manoj,

Use below script.

Data:

LOAD Column1,

     Column2,

     Column3,

     Column4

FROM

[Book1 (1).xlsx]

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

Replace(1, top, StrCnd(null))

)) where not wildmatch(Column2,'*Column*');

Result:

Capture.PNG

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Hi Nagaraj, Thanks for your reply.

Data in Row1 is heading for Table1 & Data from row 2 has to go into Table1, same for row6 & row10.

Data in Row3 will become heading for table2 & row5,row6 are values for table2

tamilarasu
Champion
Champion

Could you post your expected output (How you want to see) in same excel.?

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Table1:

    

Column1Column2Column3Column4
Test20000188/03/2016 5:22:03 PM9/03/2016 3:22:03 AM
Test220000188/03/2016 5:22:03 PM9/03/2016 3:22:03 AM
Test420000188/03/2016 5:22:03 PM9/03/2016 3:22:03 AM

Table2

  

Column1Column2Column3
10027809708/03/2016 5:22:03 PM
10027806718/03/2016 5:21:15 PM
20027809708/03/2016 5:22:03 PM
20027806718/03/2016 5:21:15 PM
30027809708/03/2016 5:22:03 PM
30027806718/03/2016 5:21:15 PM
avinashelite

Please post the desired output format with your data set ..

tamilarasu
Champion
Champion

You can try below script.

QUALIFY *;

Table1:

LOAD Column1,

     Column2,

     Column3,

     Column4

FROM

[Book1 (1).xlsx]

(ooxml, embedded labels, table is Sheet1) where Len(Trim(Column1))>0;

Table2:

LOAD Column2 as Column1,

     Column3 as Column2,

     Column4 as Column3

FROM

[Book1 (1).xlsx]

(ooxml, embedded labels, table is Sheet1) where Len(Trim(Column1))=0 and not wildmatch(Column2,'*Column*');

Capture.PNG

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Hi Nagraj, Thanks for your quick reply. It worked, but i did mistake in putting column names. Please find attached latest data

tamilarasu
Champion
Champion

Fine Manoj. Try the below script

Table1:

LOAD Column1,

     Column2,

     Column3,

     Column4

FROM

[Book1 (1)(1).xlsx]

(ooxml, embedded labels, table is Sheet1) where Len(Trim(Column1))>0;

Table2:

LOAD  Column2 as Column11,

      Column3 as Column12,

     Column4 as Column13

FROM

[Book1 (1)(1).xlsx]

(ooxml, embedded labels, table is Sheet1) where Len(Trim(Column1))=0 and not wildmatch(Column2,'Column*');