Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello guys,
I search the forums for an example but I didn't find one.
I have a directory ( named C:\test ) which contains 3 XLS files named ACT1,ACT2,ACT3.
All 3 files are in the same structure.
All I want is to build a loop which will run 3 times and will load the files.
How can I do that?
What is the correct syntax ?
Thanx a lot!
David
Hi David,
you can use a wild card:
Load
Field1,
Field2,
Field3
FROM ACT*.xls (biff, embedded labels, table is Tabelle1$);
Good luck!
Rainer
Hi David,
you can use a wild card:
Load
Field1,
Field2,
Field3
FROM ACT*.xls (biff, embedded labels, table is Tabelle1$);
Good luck!
Rainer
Hi David,
Here is an example that loads a spreadsheet with multiple sheets. The theory should also work for what you want to do.
SET vPath=C:\Training\;
for vSheetName = 2005 to 2009
"BUDGETS":
LOAD
EmployeeID,
$(vSheetName) AS BUDGETYEAR,
Budget as BUADGETAMOUNT
FROM [$(vPath)\Datasources\Budget.xls] (biff, embedded labels, table is [$(vSheetName)$],FILTERS(REPLACE(1,TOP,STRCND(NULL))));
next
Regards,
Werner
Great (and really quick) solutions!
10X guys ![]()
A really simple example of a loop:
For I = 1 to 3
LOAD F1,
F2,
F3
FROM
(biff, embedded labels, table is Sheet1$);
Next I