Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Read range of columns in Excel

Hi Friends,

Is there a way to read only few columns or set of columns from given excel. I have excel having 50+ columns but need to read only first 25 columns. How can we achieve this ?

14 Replies
Kushal_Chawda

You can do this if you have 25 field names in another excel file with same name as in actual excel

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Yes , all excels will have 25 columns. In some of we are more excels which we don't want to read

manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Column names are not fixed

Anil_Babu_Samineni

Do you already have any For each / Loop script ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
prieper
Master II
Master II

Load without header from Excel, e.g.

LOAD A,B,C,D,E..... FROM...

Then read only the first line, which may contain the headers,

and do a renaming of the fields

HTH Peter

vinieme12
Champion III
Champion III

What exactly is your requirement?

Load only First 25 columns?

or

Load only 25 columns ?

if Column names are not fixed then how do you identify which columns to load?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
manojkulkarni
Partner - Specialist II
Partner - Specialist II
Author

Column names are days of the Month (in DD-mm-yyyy format). This differs for every month.

We are not getting exactly 30/31 days columns. Some time it comes with 50 or more columns which is not required for us.

prieper
Master II
Master II

but then it may make sense to load with CROSSTABLE in first instance,

then inspect the fieldcontents and drop all fields, not being a valid date....

afsarshaikh
Creator
Creator

Place condition WHERE RecNo() >= 1 AND RecNo() < 26  at the end of your LOAD script (before the semicolon).


Hope this works!

Regards,
Afsar Shaikh
Project Manager- QlikView Dev. & Support
Afsar Shaikh
Email- afsar.shaikh@live.com