Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
QlickySense
Creator
Creator

SET csv file as variable

Hello 

 

SET DataTABLE = [Data.xlsx] (ooxml, embedded labels, table is [Data]);

It let me have DataTable with the path to the Data.xlsx file, then when I load some field I just use From $(DataTABLE);

I would like to SET csv file this way, but it doesnt work for me, I got errors

SET DataTABLE = [Data.csv] (txt, codepage is 28591, embedded labels, delimiter is ' , ', msq);

Any ideas?

Labels (2)
2 Replies
Or
MVP
MVP

Your issue is probably the quotes in the [delimiter is ','] section. Have a look at https://qlikviewcookbook.com/2018/01/let-set-quotes/

 

Saravanan_Desingh

Try something like this,

SET DataTABLE = '[Data.csv] (txt, codepage is 28591, embedded labels, delimiter is '&Chr(39)&','&Chr(39)&', msq)';

Use it like this,

LOAD *
FROM $(DataTABLE)
;