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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Error while reloading script?

Hi,


I have below script in qvw to load 41 excel sheets data at a time. when I am reloading it is showing an error filed not found: <ID>[_xlnm_#FilterDatabase].


can anyone suggest me please how can I set this.


Thanks.


tables:
SQLTables;

DISCONNECT;

Tables1:
load
*,
replace(TABLE_NAME,chr(39),'') as NEW
resident tables;

DROP Table tables;



let var=NoOfRows('Tables1');


FOR i = 0 to $(var)-1
let sheetName=subfield(peek('NEW', i,'Tables1'),'$',1);

[$(sheetName)]:

Data:
LOAD
  ID,
    
     '$(sheetName)'  as Flag ,
    

    
FROM
Data.xlsx
(ooxml, embedded labels, table is [$(sheetName)]);

NEXT i


DROP Table Tables1;

STORE Data into C:QVD\Data.qvd (qvd);
DROP Table Data;

Labels (1)
2 Replies
Not applicable
Author

I have a sheet with name as custom. this is the sheet getting problem. I tried deleting the sheet but appears again .how can I delete this from the script?

Marcio_Campestrini
Specialist
Specialist

Hi Amelia

You can test the sheet name before load. Try something like this:

If Index(sheetName, 'Sheet') > 0 Then

     Load

Endif

Márcio Rodrigo Campestrini