Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
chiranjivdas
Contributor III
Contributor III

How to pull data from multiple Excel files?

I have a QV file that currently pulls data from one excel file and the script is as follows:

LOAD Name,

             Height,

             Weight

FROM
[Height-Weight.xlsx]
(
ooxml, embedded labels);

I want it to pull additional data from a separate excel file called Track Record in the same folder. How do I change the script and make this happen?

Attached are the excel files and the QV file.

Thanks,

CD

1 Solution

Accepted Solutions
Not applicable

Hi Buddy,

Following is the simple short code for your query

Height_Weight:

LOAD Name,

     Height,

     Weight

FROM

[..\Desktop\Gaurav\Height-Weight.xlsx]

(ooxml, embedded labels, table is Sheet1);

Track_Record:

LOAD Name,

     [Current Timing],

     [Best Timing]

FROM

[..\Desktop\Gaurav\Track Record.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

4 Replies
Not applicable

Hi Buddy,

Following is the simple short code for your query

Height_Weight:

LOAD Name,

     Height,

     Weight

FROM

[..\Desktop\Gaurav\Height-Weight.xlsx]

(ooxml, embedded labels, table is Sheet1);

Track_Record:

LOAD Name,

     [Current Timing],

     [Best Timing]

FROM

[..\Desktop\Gaurav\Track Record.xlsx]

(ooxml, embedded labels, table is Sheet1);

Not applicable

Hi,

PFA sample application

Regards

Gaurav

Not applicable

Hi,

You can directly load the second table just like you've loaded the first one.

Since both the tables have a common field (Name, in this case), QlikView will automatically link these fields to form a key enabling your data set to look like a single connected table.

Your script should look like this:

HeightWeightTable:

LOAD Name,

     Height,

     Weight

FROM

[Height-Weight.xlsx]

(ooxml, embedded labels);

TrackRecordTable:

LOAD Name,

     [Current Timing],

     [Best Timing]

FROM

[Track Record.xlsx]

(ooxml, embedded labels, table is Sheet1);

Please check the attachment.

In scenarios where the data is same but field names are different for two tables, you can alias one of the fields from either of the tables to form a link between them.

Hope that helps.

Regards,

-Khaled.

chiranjivdas
Contributor III
Contributor III
Author

Thank you, people. All answers were very helpful.