Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
A folder contains multiple fields of the format 'CustmerDetails_YYYYMMDDHHMMSS.xlx'.
The YYYYMMDDHHMMSS part is the timestamp at which the file is generated. Files are generated in the folder every hour. Hence new files are constantly added in the folder, But with different Names.
How can i write the script to load all the files in the folder, into Qlikview application.
May be this?
Load * From CustomerDetails_*.xls;
Try with attached file
Or you can try this as well as
LOAD
*,FileBaseName() as FileName
FROM
[CustmerDetails*.xlx]
(biff, no labels, table is [*$]);
And another one also for loading all excel files.
LOAD *,FileBaseName() as FileName FROM
[CustmerDetails_*.xlsx]
(ooxml, embedded labels, table is [$(sheetName)]);
Hi,
to extract the filename timestamp into a new field, you could add to your load something like:
Timestamp(Timestamp#(SubField(FileBaseName(),'_',-1),'YYYYMMDDhhmmss')) as FileTimestamp
hope this helps
regards
Marco