Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to upload multiple excel sheets with different sheet names in one go

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

3 Replies
Agis-Kalogiannis
Employee
Employee

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

ecolomer
Master II
Master II

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

Agis-Kalogiannis
Employee
Employee

If this is what you wanted Sunny, could you please close this discussion by selecting the correct/helpful answer?

Thanks

Agis