Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to load data from different excel sheet tabs?


Hi everyone,

Can anyone help me with this challenge.

I have an excel file which has two sheet tabs, the first sheet tab has two columns(A and B), and the second one has three columns(C, D, and E).

At the end I would like to have a table with both columns from the first sheet and one column from the second sheet.

A

B

a

i

b

f

First sheet tab

C

D

E

1

x

r

2

y

s

Second sheet tab

At the end I need such a table:

C

A

B

1

a

i

2

b

f

How can I load data from those two sheet tabs to achieve that?

Thanks ahead!!

Regards,

Olivier

1 Solution

Accepted Solutions
ramoncova06
Specialist III
Specialist III

do the sheets contain a field that links the data together ? or are they just ordered by row ?

if they are ordered by row then join them based on the row number

sheetone:

LOAD a,

b

RowNo() as Row

FROM

[test.xlsx]

(ooxml, embedded labels, table is sheet1);

sheettwo:

left join(sheetone)

LOAD c,

e,

f

RowNo() as Row

FROM

[test.xlsx]

(ooxml, embedded labels, table is sheet2);

View solution in original post

3 Replies
ramoncova06
Specialist III
Specialist III

do the sheets contain a field that links the data together ? or are they just ordered by row ?

if they are ordered by row then join them based on the row number

sheetone:

LOAD a,

b

RowNo() as Row

FROM

[test.xlsx]

(ooxml, embedded labels, table is sheet1);

sheettwo:

left join(sheetone)

LOAD c,

e,

f

RowNo() as Row

FROM

[test.xlsx]

(ooxml, embedded labels, table is sheet2);

Not applicable
Author

Thanks Ramon, they where just ordered by row and I did as you suggested and it works well.

Thanks again!