Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear friends
I have a excel sheet that i receive from my client on a daily basis that i have to load on to qlikview
But the problem is that each day that sheet has a different name
please tell me that what changes should i make to the loading logic so that i need not change the sheet name daily
Hi Sunny
I think the following discussion will help you on that
Re: Loading from multiple Excel files and multiple sheets
Tha basic idea is to create an ODBC connection to get all the sheet names and then loop through them to get the data.
Agis
you can use a script similar to this:
DIRECTORY C:\Users\KonoGes\Documents;
Set Root='C:\Users\KonoGes\Documents';
for each Ext in 'qvw', 'qva', 'qvo', 'qvs'
for each Dir in dirlist ('$(Root)'&'\*')
for each File in filelist (Dir&'\*.' &Ext)
Load
'$(File)' as Name,
FileSize( '$(File)' ) as Size,
FileTime( '$(File)' ) as FileTime,
Subfield('$(File)', '\', 1+SubStringCount('$(File)', '\')) as Fichero,
left('$(File)', index('$(File)', '\', -1)) as Directorio
autogenerate 1;
next File
next Dir
next Ext
If this is what you wanted Sunny, could you please close this discussion by selecting the correct/helpful answer?
Thanks
Agis