Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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;

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