Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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);
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);
Thanks Ramon, they where just ordered by row and I did as you suggested and it works well.
Thanks again!