Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey ALL,
hope can anyone help :
i have many excel files here is ana example of want
first excel file is "file2015' and the seconde is "file2016" each has many sheets
i need to read from file2015 the sheet1 and concatenate it with sheet1 from "file2016"
maybe you can help by giving me a loop that help to do this task,
Thank you,
//create a empty table to concatenate to
ExcelData:
LOAD * INLINE [
Fieldname];
Then use FROM file*.xls....
Concatenate (ExcelData)
LOAD *
FROM file*.xls ......
Or use loop
For each File in FileList ('file*.xls')
Concatenate (ExcelData)
LOAD *
FROM file*.xls ......
Next File
Hi Mario,
If i understand what you look for, you want to make a loop to concatenate two sheets from two files.
Try with this script:
for each File in FileList ('*.xls')
DataBase:
load *,
from [$(File)]
(biff, embedded labels, table is Sheet1$);
next;
If you want to concatenate sheets, you have to proceed like this:
For each vSheet in 'Sheet1$', 'Sheet2$','Sheet3$' etc...
DataBase:
LOAD
*
FROM
[Excel.xls]
(biff, embedded labels, table is [$(vSheet)]);
next;
But if I was known exactly what you need to do I could give you the exact solution.
Best regards