Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to create an import for script with N file excel with same column name but with different names?
Thank you
Hi Ciro,
If the format of the files are identical it is very simple.
You can use a wildcard in the filename, like this:
LOAD
*
FROM [..\Data\Accounts\Accounts-20*.xls]
(biff, embedded labels, header is 1 lines, table is [Billable Items$]);
Or, to make things more robust, you can do a loop:
for each vFile in FileList('..\Data\Accounts\Accounts-20*.xls')
LOAD
*
FROM [$(vFile)]
(biff, embedded labels, header is 1 lines, table is [Billable Items$]);
next
In both cases you can pick up the actual file name by using the filename funciton...
LOAD
filename() as [Source File],
*
FROM ...
Hope that helps.
Steve
Hi Ciro,
If the format of the files are identical it is very simple.
You can use a wildcard in the filename, like this:
LOAD
*
FROM [..\Data\Accounts\Accounts-20*.xls]
(biff, embedded labels, header is 1 lines, table is [Billable Items$]);
Or, to make things more robust, you can do a loop:
for each vFile in FileList('..\Data\Accounts\Accounts-20*.xls')
LOAD
*
FROM [$(vFile)]
(biff, embedded labels, header is 1 lines, table is [Billable Items$]);
next
In both cases you can pick up the actual file name by using the filename funciton...
LOAD
filename() as [Source File],
*
FROM ...
Hope that helps.
Steve