Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have daily xls file in a folder with the names as 01-06-2016.xls,02-06-2016.xls,03-06-2016.xls,....30-06-2016.xls.
How to load them dynamically?
Thanks in advance.
SampleData is attached.
Data:
LOAD [Serial Number],
date(floor(Date#([Date & Time],'DD-MM-YYYY hh:mm:ss')),'DD-MM-YYYY') as [Date & Time],
Originator,
User,
Shift,
[Operator Class],
[AVC Class],
[Payment Method],
Fare,
[Vehicle Reg. #],
Description,
[Amount Due],
[Amount Paid]
FROM
[Excel\01-06-2016.xls]
(biff, embedded labels, table is Sheet1$);
Change this code:
Excel\01-06-2016.xls
.... to this code:
Excel\*.xls
Alternatively, you could go with this code:
Excel\??-??-20??.xls
... if you have other xls files in that folder you do not want to load.
Change this code:
Excel\01-06-2016.xls
.... to this code:
Excel\*.xls
Alternatively, you could go with this code:
Excel\??-??-20??.xls
... if you have other xls files in that folder you do not want to load.