Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jasl
Contributor II
Contributor II

How to get rid of the double quotes; while storing into a txt/csv format

Hi, 

Overview - I have semi- structured data file (.txt) . I need to read data from the file and bring it to a structured table format.

I have been able to successfully load the data and get it the required format, based on the meta data available.

Now, to implement the above, I had to read each line from the text file and then save it in a  variable, in the following format :

vLine = Field_Value_1 ; Field_Value_2 ; Field_Value_3 ; Field_Value_4..... so on 

Therefore, for each line I have a variable. Furthermore, I  created a table which contains all the variables. Following is the table structure: 

Raw_Processed: 

Procesed_Data
vLine _1
vLine _2
vLine _3
vLine _4
vLine _5

 

Lastly, I stored it to a csv/txt format, assuming if I load it again, it would pick the right format (Specifying the delimiter as ";").In principle, it is working .

However, when Qlikview stores the table in the csv/txt format, it is enclosing it with "___" 

"Field_Value_1 ; Field_Value_2 ; Field_Value_3 ; Field_Value_4"

instead of having it 

Field_Value_1 ; Field_Value_2 ; Field_Value_3 ; Field_Value_4

Therefore, when I load it again, the Delimiter- Logic doesn't work, because it is taking it as a one big string instead of separate different components separated by ";" . I have tried all options known to me, but nothing seems to work... 

Essentially,I can get it work if I can save it without the "___" 

Kind Regards 

Jas

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
juraj_misina
Luminary Alumni
Luminary Alumni

If you set "no quotes" in format specification in the second load it should work, I guess.

View solution in original post

6 Replies
Lisa_P
Employee
Employee

Can you give a sample of your data source
jasl
Contributor II
Contributor II
Author

Hi, 

I have uploaded the sample data files now. 

juraj_misina
Luminary Alumni
Luminary Alumni

If you set "no quotes" in format specification in the second load it should work, I guess.

View solution in original post

jasl
Contributor II
Contributor II
Author

Hi Juraj..

It works.. Thanks for the solution.. I ended up doing  it the long winded way, I converted character to their ASCII equivalent and afterwards in the second load got them back to non-ASCII format..

I suppose yours is a much better way..   

Jas

ganeshsvm
Creator II
Creator II

Hello Juraj,

I have the same requirement but in Qlik Sense, hope the same solution applies to QS also?

In my case, the double quotes appear  in a value because the value contains a single quote, I understood Qlik treats single quotes as a special char, so it enclosed the values in double quotes. 

Example:

Actual value in table : AB's Office

Value after storing in csv : "AB's Office"

and this happens for all values with single quotes.

 

I tried the solution you mentioned, using "no quotes" in format specifier of store statement, but it didn't work.  please find the below statement I used. It gives error when I used "no quotes".

ganeshsvm_0-1601536791482.png

I tried to put "no quotes" in all possible ways, like putting it in (), "", etc. but nothing worked, it keeps giving error. I may be using it the wrong way also, please correct me with proper syntax.

BTW, I'm using Qlik Sense Nov 2018 version. Please let me know if there is any other option. Thanks in anticipation.

juraj_misina
Luminary Alumni
Luminary Alumni

Yeah, it seems that the store command in QS is somewhat lighter then it was in QV according to the documentation you can only specify file format (qvd|csv|txt) and delimiter, although for load, you can still specify quoting as well.