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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qv_testing
Specialist II
Specialist II

Help

Hi Comunity,

can anybody help me.

.I have source Excel file in that 3 sheets, in future i am adding some new sheets

i want to load all sheets

Thanks in Advance

6 Replies
m_woolf
Master II
Master II

qv_testing
Specialist II
Specialist II
Author

Hi Michal,

for each vSheet in 'Jan$', 'Feb$','Oct$'

MyTableName:

Load ........From (biff,embedded labels,table is $(vSheet));

next;

If i have up to 10 sheets it's fine for me..

but i don't know how many sheets in my Excel  file

m_woolf
Master II
Master II

qv_testing
Specialist II
Specialist II
Author

Hi Michal,

ODBC CONNECT TO [Excel Files;DBQ=D:\Players.xlsx];

XlsTables:

SQLTables;

//DISCONNECT;

LET vRows = NoOfRows('XlsTables');

FOR i = 0 TO $(vRows)-1

    LET vSheetName = subfield(peek('TABLE_NAME', i,'XlsTables'),'$',1);

Players:

LOAD Name,

     Born,

     Country,

     Tests,

     ODIs,

     T20s

FROM

D:\Players.xlsx

(ooxml, embedded labels, table is $(vSheetName));

NEXT i

DROP TABLE XlsTables;

m_woolf
Master II
Master II

I believe the script is for .xlsx files.

If you read the entire web page, it mentions below the script that you need to modify the Connect and Load statements for .xls files.

qv_testing
Specialist II
Specialist II
Author

Thank you so much it's perfectly alright