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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
CK_WAKE
Creator
Creator

Import excel data from specific columns from different header

Hi, I am new to QLIK.
I have an Excel data set stored on our server; from this Excel, I want to import data only from specific columns to rows, that is from column N to R, and rows starting from 2 to 20.
I appreciate your advice on this. Data Load Editor

Labels (2)
1 Solution

Accepted Solutions
LRuCelver
Partner - Creator III
Partner - Creator III

Here you go:

The 1s at the end of the fieldnames has been added by Qlik because you have another column in the table with either name.

Data:
First 14
NoConcatenate Load
    Period1 as Period,
    var11 as var1,
    var21 as var2,
    var31 as var3
From [lib://AttachedFiles/QLIK Column reader.xlsx]
(ooxml, embedded labels, table is Analysis)
Where not IsNull(Period1);

 

View solution in original post

5 Replies
LRuCelver
Partner - Creator III
Partner - Creator III

Since you are starting in row 2, I'm assuming row 1 is a header with the field names. You can use this (adjust to your data):

Data:
First 19	//	This is only needed if there is data past row 20
NoConcatenate Load
    HeraderColumnN,
    HeraderColumnO,
    HeraderColumnP,
    HeraderColumnQ,
    HeraderColumnR
FROM [lib://AttachedFiles/Table.xlsx]
(ooxml, embedded labels, table is Sheet1);

F_B
Specialist II
Specialist II

Hi @CK_WAKE,

when selecting the Excel file as data source, you can easily choose sheet, columns and the number of rows to omit as header:

Loading data from Microsoft Excel spreadsheets | Qlik Sense on Windows Help

 

Hope this can help you.

CK_WAKE
Creator
Creator
Author

Hi There, Thanks for getting back. However, the above code didn't work,  saying  could not find the column HeraderColumnN. Also, I looked into the above link and cannot select the column specifically while importing. Therefore, I have attached dummy data for your reference. Please note the data to read is from Column O Column R.

LRuCelver
Partner - Creator III
Partner - Creator III

Here you go:

The 1s at the end of the fieldnames has been added by Qlik because you have another column in the table with either name.

Data:
First 14
NoConcatenate Load
    Period1 as Period,
    var11 as var1,
    var21 as var2,
    var31 as var3
From [lib://AttachedFiles/QLIK Column reader.xlsx]
(ooxml, embedded labels, table is Analysis)
Where not IsNull(Period1);

 

CK_WAKE
Creator
Creator
Author

Thanks for all the help, it worked.