Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

evansabres
Valued Contributor

Error in Script for Loop

Hello -

I am creating an application using an .xlsx file that has 82 different sheets. I want to create a script that will allow me to access all 82 sheets.

Currently, my script is as is:

// ====================Broadcast Intervals Table ====================

DIRECTORY 'Q:\qlkvw\prod\data\digital\Nielsen\Ratings';

LET vStartSheetNum = 1;
LET vEndSheetNum = 82;
Let vExcelFileName = 'Broadcast Intervals';

//GENERATE EMPTY TABLE
INTERVALS_TABLE:
LOAD
'' AS TEST1
AUTOGENERATE (0);
FOR index = vStartSheetNum TO vEndSheetNum

CONCATENATE(INTERVALS_TABLE)
LOAD
GameDate,
Time,
Rating,
Share,
Households
FROM [$(vExcelFileName).xlsx] (ooxml, embedded labels, table is [Game $(index)]);
NEXT

However, when I run the script, I get the following error message:

Script line error:

FOR index = vStartSheetNum TO vEndSheetNum

Please help.

Thank you.

1 Solution

Accepted Solutions
evansabres
Valued Contributor

Re: Error in Script for Loop

I found my entirely dumb error.

Please ignore this post

1 Reply
evansabres
Valued Contributor

Re: Error in Script for Loop

I found my entirely dumb error.

Please ignore this post