Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmark1990
Contributor III
Contributor III

Why can't I use applymap on a CSV load?

I have an applymap function in my QLikView application that loads a CSV file. Before it was an Exel file and the function worked correctly. Now I converted my Excel files to CSV files and run into an error. My code is:


MapAanpassingen_data_NAW:

Mapping LOAD [waarde-in] as [waarde-in1], [waarde-uit] as [waarde-uit1]

FROM [Aanpassingen data alle tabellen.xlsx] (ooxml, embedded labels, table is Blad1)

Where (sheet <> 'NAV' and actie <> 'delete');


NAW1:

LOAD

applymap('MapAanpassingen_data_NAW', zoeknaam, zoeknaam) as zoeknaam,

geslacht, H_PC, geboortedatum, land

FROM [171220 NAW.csv] (txt, utf8, embedded labels, delimiter is ';', msq)

Where len(applymap('MapAanpassingen_data_NAW', zoeknaam, null())) >= 1;


The error that I recieve is :


File format error

Unsupported or bad format in BIFF file

Things that I tried:

  • Using the 171220 NAW.xls file with exactly the same data and field names > succesfullly
  • Create a table with the content of the file

Test:

LOAD zoeknaam, geslacht, H_PC, geboortedatum, land

FROM [171220 NAW.csv] (txt, utf8, embedded labels, delimiter is ';', msq); > succesfully

Whats the reason of this error and how to solve this?

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

It seems that somewhere in your code, someone is still trying to read an old-style XLS file (BIFF). Are you sure all option strings have been modified when switching from Excel format to CSV format? Maybe you are creating another Mapping table where you changed the source file name, but forgot to change the option string?

View solution in original post

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

It seems that somewhere in your code, someone is still trying to read an old-style XLS file (BIFF). Are you sure all option strings have been modified when switching from Excel format to CSV format? Maybe you are creating another Mapping table where you changed the source file name, but forgot to change the option string?

qlikmark1990
Contributor III
Contributor III
Author

Thanks you for your reply. Indeed, somewhere else in my script I was still trying to read an XLS file instead of CSV file.