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 tried it and it works correctly for me (see attached)
or maybe I misunderstood...
After more tests, it turned out it's due to a simple quote in this field. I edited original post.
But that's the way this field should be, and without the double quotes when I store it. Is there a trick to deal with this?
This seems to work for me, can you upload a sample set of data to test it.
Thanks,
SC
Hi, I tested Ioannis Giakoumakis example and it works, however, your issue could be with something else, could you upload a sample of your data please?
regards
Thanks for your answers. Problem appears exactly when I add a text field containing a simple quote, example in attached.
Single and double quotes are part of Qlikview's reserve literals to identify strings. That is the reason why it adds double quotes to your csv file.
OK. Is there any way to get the csv rid of double quotes automatically after this?
maybe using purgechar() before exporting to csv
This field is meant to be transmitted to SAP in the end with the simple quote. Is there a way through a QV macro to either clean the csv or add the quote in csv afterwards?