Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to load different tables from a single excel sheet into seperate tables?

Hi,

I have one excel sheet contains different sheets, but one sheet have more than one table.

QV is loading those tables as one table. Could you please suggest us how to load those tables seperately by recognising their headers?

Thanks in advance,

Kumari.

5 Replies
hic
Former Employee
Former Employee

You need to create seveal load statements in the QlikView script, and make sure that each Load contains just the fields you want to have.

HIC

Not applicable
Author

Hi Henric,

Thanks for your reply, those two tables have the same field names and same no.of fields, but the data varies.

Please help me on this...

Kumari

hic
Former Employee
Former Employee

Let me get this straight: You have one sheet in an Excel document that has two tables, and the two tables have identical sets of fields? I would change this Excel sheet so that it gets one table per sheet.

But if you cannot do that, you could instead load the two tables using columnar addresses instead. Choose "None" inthe labels control and adjust the number of header lines so that you do not load the field names.

Image2.png

Then you will get a Load statement that loads @1, @2, etc. Rename these to the proper field names.

LOAD @1 as FieldA,

     @2 as FieldB,

     @3 as FieldC

FROM

Then do the same for the second table.

HIC

Not applicable
Author

Henric, my tables are below one another means have the same column number shown in the attached excel sheet, please suggest me accordingly.

Kumari.

hic
Former Employee
Former Employee

Since the bottom two two tables are summations of the top table, I would just load the raw data using a where clause. I would load no subtotals whatsoever. It's better to create the totals and the subtotals in QlikView.

For example

LOAD [Month / Year],

     Project,

     Service,

     [Head Count]

FROM [Book1 (2).xlsx] (ooxml, embedded labels, table is Sheet1)

          Where IsNum([Month / Year]) and RecNo() <= 13;

HIC