Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hi Friends I have below Sample Dataset I want to give the column names of one table by another table values brief Example is below added. Please suggest me what will be the Query?

[SalesHeader]:

LOAD [col1],

  [col2],

  [col3]

FROM [lib://Desktop/x2.xlsx]

(ooxml, embedded labels, table is Sheet1);

below is Data

col1col2col3
Sales ValueSales QtyNet Sales

[SalesData]:

LOAD ,

  ,

 

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

Sample Data without header now.

1234380
1244282
1254184
1264086

I want to give the header such as col1 header will be SalesHeader table first column i.e col1 value like that all.

Sales Value Sales Qty Net Sales

1234380
1244282
1254184
1264086

Is it possible friends?? please suggest me. Thanks,

Bibhuti

1 Solution

Accepted Solutions
Not applicable
Author

Try:

[SalesData]:

LOAD

as YourColumnName1,  

  as YourColumnName2,

  as YourColumnName3

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

View solution in original post

4 Replies
Not applicable
Author

IS the Excel file your loading from have the column headers as col 1, col 2 etc with the values under them?  If so you can skip the 1st line like this,

(ooxml, embedded labels, header is 1 lines, table is Sheet1);

or

you can use the rename function with a mapping load:

FieldNameMap;

Mapping Load OldFieldName, NewFieldName From FieldNames ;

Rename Fields using FieldNameMap;

Not applicable
Author

We can not write direct Query based on SalesHeader column name ??

Suppose I am loading SalesData table there Can it be possible to Assign column name as SalesHeader column values ??

[SalesData]:

LOAD

,   // Here I want assign column name will be SalesHeader Column value

  ,

 

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

Is it possible??

Not applicable
Author

Try:

[SalesData]:

LOAD

as YourColumnName1,  

  as YourColumnName2,

  as YourColumnName3

FROM [lib://Desktop/x1.xlsx]

(ooxml, no labels, table is Sheet1);

Not applicable
Author

I am not sure I understand fully. How would you write the query to extract your data? From here I may be able to assist.