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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
brunobertels
Master
Master

Error with load xlsx files , "Field not found"

Hi all

I have each month an excel files with this format 01_ABCD_QUALIF_AI.xlsx where first two digit are the month 

for example :

01_ABCD_QUALIF_AI.xlsx

02_ABCD_QUALIF_AI.xlsx

03_ABCD_QUALIF_AI.xlsx

I'am loading all excel files from a folder using ?? in the excel files name  like that "??_ABCD_QUALIF_AI.xlsx" :

FROM [lib://QUALIF_2025 /??_ABCD_QUALIF_AI.xlsx]
(ooxml, embedded labels, table is [My Sheet])

it was working perfectly but this morning I have a script error field not found : 

 

Chargement de données démarré
 
My Sheet Lignes extraites : 10 043
My Sheet << My Sheet Lignes extraites : 18 113
My Sheet << My Sheet Lignes extraites : 25 323
 
L'erreur suivante s'est produite:
Field 'ORIGINE' not found
 
Emplacement de l'erreur:
LOAD DOSSIER_RELATION, TYPE_DOSSIER_RELATION, NUM_PERSONNE, TYPE_ASSURE, IDFSYS_ACTION, date(date(floor(DATE_ACTION),'DD/MM/YYYY'),'DD/MM/YYYY') as DATE_ACTION, TYPE_ACTION, ORIGINE, LIB_ORIGINE_ACTION, ETAT, right(UTILISATEUR,5) as MATRICULE, replace([NOM_LONG],'DEL OGLIO','DELLOGLIO') as NOM_LONG, Capitalize(PRENOM) as PRENOM, RESEAU, AGENCE, RESULTAT, NATURE_APPELANT, ER_DOSSIER_RELATION, DERNIERE_ER_CONNUE, ENTITE_RATTACHEMENT_FINALE FROM [lib://QUALIF_2025/??_ABCD_QUALIF_AI.xlsx] (ooxml, embedded labels, table is [My Sheet]) where ORIGINE='RE' OR ORIGINE='AE'
 
Les données n'ont pas été chargées. Corrigez l'erreur, puis recommencez l'opération de chargement.
 
i checked the labels and everythink is OK 
I tried to change the script like that : 
 
LOAD
*
FROM [lib://QUALIF_2025/??_ABCD_QUALIF_AI.xlsx]
(ooxml, embedded labels, table is [My Sheet])
where ORIGINE='RE' OR ORIGINE='AE';
 
got the same error : 
Chargement de données démarré
 
My Sheet Lignes extraites : 10 043 My Sheet << My Sheet
Lignes extraites : 18 113 My Sheet << My Sheet Lignes extraites : 25 323
 
L'erreur suivante s'est produite:
Field 'ORIGINE' not found
 
Emplacement de l'erreur:
LOAD * FROM [lib://QUALIF_2025/??_ABCD_QUALIF_AI.xlsx] (ooxml, embedded labels, table is [My Sheet]) where ORIGINE='RE' OR ORIGINE='AE'
 
Les données n'ont pas été chargées. Corrigez l'erreur, puis recommencez l'opération de chargement.
 
 
when I load the files one by one each script works perfectly : 
 
load 
LOAD * FROM [lib://QUALIF_2025/01_ABCD_QUALIF_AI.xlsx] (ooxml, embedded labels, table is [My Sheet]) where ORIGINE='RE' OR ORIGINE='AE'
 
it seem that qlik does not recognise labels when trying to load all files in the same script it the format is xlsx ? 
 
Can someone help me ? 
 
Thanks in advance 
Labels (2)
1 Solution

Accepted Solutions
Lucke_Hallbergson

If you load files with noconcatenate added (see https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes...) and inspect fieldnames, do you see any difference when looking at the tables in Data Model Viewer?

Another way to pinpoint could be to try to load like this;

FOR EACH vFile IN FileList('lib://QUALIF_2025/??_ABCD_QUALIF_AI.xlsx')
   TRACE Loading file: $(vFile);
   LOAD * FROM [$(vFile)]
   (ooxml, embedded labels, table is [My Sheet]);
NEXT vFile

That would also pinpoint which file is giving you trouble

View solution in original post

2 Replies
Lucke_Hallbergson

If you load files with noconcatenate added (see https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes...) and inspect fieldnames, do you see any difference when looking at the tables in Data Model Viewer?

Another way to pinpoint could be to try to load like this;

FOR EACH vFile IN FileList('lib://QUALIF_2025/??_ABCD_QUALIF_AI.xlsx')
   TRACE Loading file: $(vFile);
   LOAD * FROM [$(vFile)]
   (ooxml, embedded labels, table is [My Sheet]);
NEXT vFile

That would also pinpoint which file is giving you trouble

brunobertels
Master
Master
Author

Hi Lucke 

 

Thanks a lot for your respons. It traced the error in the fourth file.

since april those export are now stored in a google space rather than a windows directory and it seems that it corrupts the output format. 

 

brunobertels_0-1747828785696.png

 

regards