This is for csv-file
so change the .csv to .xls
and (ansi, txt, delimiter is ';', embedded labels, msq)
FOR EACH file in filelist('$(dir)\*.csv')
LET vBasename = subfield( subfield('$(file)', '\', -1), '.', 1);
LOAD '$(vBasename)' as basename,
'$(file)' as file
// Each file represents a table.
if fieldvaluecount('basename')>0 then
FOR i = 1 to fieldvaluecount('basename')
LET vBasename = fieldvalue('basename', i);
LET file = fieldvalue('file', i);
from [$(file)] (ansi, txt, delimiter is ';', embedded labels, msq);
drop table filelist;
Thanks for the reply . Need few more suggestion. If in a folder everyday QV expects new files with in same format with daily records. Now after one year we might require to have Qtrly as well as yearly.
Hence what should be correct startegy for file handling. My plan is each day read daily record and conctenate of data in qvd file after reading archive the file nto different folder. When we run qtrly or yearly trend load the data from .qvd files. Please suggest if there is any better approach.