Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a script which ends by storing formated data in a csv file (delimiter ';') that can later be uploaded in SAP. This is for a recurring job I'd like to get fully automated. It all works fine except that the final csv file contains double quotes around a field. This field is a long text containing a simple quote, which I insert as &chr(39)& in the concatenation.
But then, whether I make
store * from ExportCSV into ExportCSV.csv (txt, utf8, delimiter is ';')
or
store * from ExportCSV into ExportCSV.csv (txt, utf8, delimiter is ';', no quotes)
I get those double quotes.
Is there a way to overcome this? Or is there other ways, like using a macro to clear the double quotes in the csv afterwards ?
Many thanks in advance.
I have the same problem - even worse, the contents of every field that contains a string must be enclosed in double quotes.
Fortunately, I do not need to automate the export. What I did is this:
- Prepare the table in the Script
- Have a table box that contains the table
- Klick on the "Send to Excel" icon in the table box's title bar
- select the required columns in excel, Copy and Paste into an editor, Save.
I ended up adding a "RecNo" column to my table, sorting according to it in the table box and leaving it out when copying in Excel. Without that, the order in the Excel export seemed to be unpredictable.
HTH, Frank
Any Ideas How to resolve this problem??
How can we avoid these double quotes as the file needs to be used in a separate system.??
I have seen looking around many post the same issue since 2013 and I really feeling shocking that qlik has not declare an oficial solution. I have the same issue and this issue has generated several questioning around my company to prospect to migrate a qlik environment. Another developer is just working now in an PHP cron that solve the problem. Quotes 1, QLIK 0.
Regards
Have you tried some kind of 'exotic' delimiter like '&'?
Tomasz
This way worked for me.
LET vDoubleQuote = Chr(10);
NoConcatenate
FACTS:
LOAD
CRM_CODE,
'$(vDoubleQuote)'&ProductPackName&'$(vDoubleQuote)' as ProductPack,
'$(vDoubleQuote)'&'SELLOUT'&'$(vDoubleQuote)' as METRIC,
'$(vDoubleQuote)'&left(cod_date_operation,4)&'$(vDoubleQuote)' as Year,
'$(vDoubleQuote)'&right(cod_date_operation,2)&'$(vDoubleQuote)' as Month,
If(IsNull(#SellOut_Units),0,#SellOut_Units) as VALUE
Resident FactsTransact;
STORE FACTS into Facts.csv (txt, delimiter is '|');