Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
brunobertels
Valued Contributor II

error field not found / loop on excel sheet/

Hi community

I'am facing an issue with this attached app

This app use an ODBC connexion to loop thru excel sheet.

Those excel sheet have all the same structure and header and are named by week ( Eg S1 to S43) , by quarter ( Eg T1 to T4) and by month ( janvier fevrier mars)

So a made three script to load tables

one by week adding the name of the sheet as a dimension "Week" and it works well (table MyTableSem)

One by quarter adding the name of the sheet as a dimension "Quarter" and it works well also  (table MyTableTri)

Then i wanted to do the same with month sheet

It's seems to load until the month of August ( Aout in french)

but i have this message error in the script editor :

I tried to copy past the Aout sheet data to another sheet then renamed it as aout but i have the same error message.

Of course the sheet named "aout" is existing in the excel workbook.

attached is my qvf app

If someone could have a glance and solve my problem it would be very great.

Thanks in advance

1 Solution

Accepted Solutions

Re: error field not found / loop on excel sheet/

Hi Bruno,

Change this:

LOAD

$(MoisNb) as "Mois",

To this:

LOAD

'$(MoisNb)' as "Mois", // Note the single quotes that defines a string

4 Replies

Re: error field not found / loop on excel sheet/

Hi Bruno,

Change this:

LOAD

$(MoisNb) as "Mois",

To this:

LOAD

'$(MoisNb)' as "Mois", // Note the single quotes that defines a string

marcus_malinow
Valued Contributor III

Re: error field not found / loop on excel sheet/

Hi Bruno,

the issue is with the field named  août.

Try enclosing the field name  août in square brackets [] or double quotes

e.g.

LOAD

    [août] as "Mois"

Marcus

brunobertels
Valued Contributor II

Re: error field not found / loop on excel sheet/

Hi Ruben,

Thank you so much,

I don't know why nor how but it works perfectly.

Can I ask you something more about my Month dim :

I Add this in the script to convert it as month dimension to get the value in right order and not alphatebical order

month(date#('$(MoisNb)','MMM')) as "Mois",

but it does'nt load the sheet "mai"

I think it's because of this in my script :

if(len(sheetName))>3 then

load ...

I Use this to take only sheet name different from S1 to SXX and sheet name different from T1 ou T4

but it cause a missing load with mai in my month calendar.

Do you see another way to excluse weeks en quarter sheets ?

Once again thank you very much for rapid answer

Bruno

brunobertels
Valued Contributor II

Re: error field not found / loop on excel sheet/

Hi Marcus,

thanks for advise, Ruben give me the solution.

Bruno