Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

qlikviewforum
Contributor II

Avoiding double quotes when storing table in a text file!

Hi All

store Table into Data.bat(txt);

When I am trying to load the data into a txt file double quotes is getting added along with that.

For example:

If the original contains something like below.

"\\thrtjh568\qv\server\qvw\Development\QVD\Expense"

When it stores it into a txt file. It stores something like below.

""\\thrtjh568\qv\server\qvw\Development\QVD\Expense""

How can I eliminated double quotes when storing it in a text file. Please help!

Regards,

qvforum

Tags (3)
13 Replies
qlikviewforum
Contributor II

Re: Avoiding double quotes when storing table in a text file!

Have already tried that but didn't workout!

MVP
MVP

Re: Avoiding double quotes when storing table in a text file!

Did anyone find an answer to this one?  In the past I have got around the problem by doing the store with a FileSystemObject write in a macro - but I've another case come up when I would much rather use a store on load.

Any suggestions welcome!

Steve

Not applicable

Re: Avoiding double quotes when storing table in a text file!

Are you populating your data from Excel file? It is seen in excel file, can you please try getting data from CSV file instead.

MVP
MVP

Re: Avoiding double quotes when storing table in a text file!

As it happens the data is coming from Excel - but I'm not sure why that would affect the output?

When I get a chance I will give this a go.  Thanks for the input!

sebastiandperei
Valued Contributor

Re: Avoiding double quotes when storing table in a text file!

It happens with all the fields?

Before the Store, try erasing the ", with replace, like:

replace (text_field, '"', '')   (first parameter, the field; second, doble quotes between single quotes; last parameter, only a pair of single quotes)

And then Store it.

MVP
MVP

Re: Avoiding double quotes when storing table in a text file!

The issues only occur when I have a comma or quote symbol in the data.  QlikView tries to make things into a valid CSV file by quoting the values.  The issue is though that I am writing out an HTML file with data in, so the quotation marks I have in the code are critical.  Removing them as you suggest, with a Replace, would render my HTML incorrect.

It feels like there should be parameters to the STORE statement that would handle this - but I've not managed to hit upon the correct syntax yet.

-Steve

lalitinmbd
New Contributor III

Re: Avoiding double quotes when storing table in a text file!

Hey Steve ,

Will you share the Macro that you used to eliminate the extra double quotes while storing.

Thanks

Lalit

MVP
MVP

Re: Avoiding double quotes when storing table in a text file!

Hi Lalit,

I'm afraid the marco was written on site for a client so I don't have access to it, or to anything similar on hand.

It used the FileSystemObject and the Write statement.  You should be able to find something similar if you search.  You could try using the search on http://askqv.com/ to see if that turns up any suggestions.

Steve

mhartono
Contributor

Re: Avoiding double quotes when storing table in a text file!

In my case, once I open the data in csv, I see the double quotes in the original file. Excel seems to hide double quotes that start and end texts.