Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Multiple Excel

Dear Experts,

i have multiple excel sheets which i don't know,

when im loading into qlikview how can i know how many excel sheets im loading

Can some one tell me any way to know


Thanks in Advance

Niranjan 

Labels (1)
1 Solution

Accepted Solutions
senpradip007
Specialist III
Specialist III

Make an ODBC connection like

ODBC CONNECT32 TO [NSEBSEConn;DBQ=C:\STOCK PRICES.xls];

tables: 

SQLtables;

DISCONNECT;

FOR i = 0 to NoOfRows('tables')-1

  LET sheetName1 = purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39));

  Let sheetName = PurgeChar(trim(sheetName1),'#');

Tab:

  LOAD Date,

  Date as [BSENSE Date],

     [Open Price],

    [High Price],

     [Low Price],

     [Close Price], 

  Trim(Purgechar(Right('$(sheetName)',Len('$(sheetName)')-4),'$')) as [BSENSE Sheet],

  Left('$(sheetName)',3) as [BSENSE Flag] 

FROM

(biff, embedded labels, table is [$(sheetName)]);

NEXT

Hope it will help.

View solution in original post

1 Reply
senpradip007
Specialist III
Specialist III

Make an ODBC connection like

ODBC CONNECT32 TO [NSEBSEConn;DBQ=C:\STOCK PRICES.xls];

tables: 

SQLtables;

DISCONNECT;

FOR i = 0 to NoOfRows('tables')-1

  LET sheetName1 = purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39));

  Let sheetName = PurgeChar(trim(sheetName1),'#');

Tab:

  LOAD Date,

  Date as [BSENSE Date],

     [Open Price],

    [High Price],

     [Low Price],

     [Close Price], 

  Trim(Purgechar(Right('$(sheetName)',Len('$(sheetName)')-4),'$')) as [BSENSE Sheet],

  Left('$(sheetName)',3) as [BSENSE Flag] 

FROM

(biff, embedded labels, table is [$(sheetName)]);

NEXT

Hope it will help.