Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
balrammahato204
Creator
Creator

How to remove Unwanted Special character when generating the text file.

Hi All,

Please help me

My issue is when I am generating text file from the qlikview then i am getting random special character( " ) in my text file. Please let me know how can i remove these special character from the text file.

Please find the below example

Eg:-

"0000000080002   ISERVISXTUR"
0000000090002   ISERVISXPGH
0000000100002   ISERVISXHGA
"0000001180002   ISERVISXHUR"
0000000120002   ISERVISXKAT
0000000130002   ISERVISXPUK

Thanks and Regards

Balram Mahato

11 Replies
sunny_talwar

Where are you extracting this from? Script?

May be something like this:

KeepChar(FieldName, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVQXYZ 1234567890') as FieldName

trdandamudi
Master II
Master II

Can you please post a sample app ?

jolivares
Specialist
Specialist

You can do that Sunny said before or if you know which character you want to suppress user this:

purgechar(FieldName,'....') as FieldName

Anonymous
Not applicable

If it is only " you want to get of then maybe :

    PurgeChar(FieldName, '"') as FieldName


Bit hard to see but '"' is <single quote><doublequote><single quote>

balrammahato204
Creator
Creator
Author

Hi Thirumala,

Please find the sample app. But when i am generating the data in less volume then i am not getting the special character.

So in this sample you can see how i am generating the Text file.

Thanks and Regards

Balram

balrammahato204
Creator
Creator
Author

Purgechar is not working still special characters are coming i my extract.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Probably caused by forced quoting being active when saving a table as type txt.

If you eliminate all whitespace characters from your concatenated field before STOREing it into a text field, do you still get (double) quotes? E.g. like when you change the code for GenerateLoader into

:

PurgeChar(A1 & A2 & A3, '      ') AS [Loader File]

:

with the string parameter containing just a space and a tab character...

Peter

balrammahato204
Creator
Creator
Author

Hi Peter,

As per my requirement when i have no value in my columns then i have to populate the fixed length space

and same data i have to extract in text file.

Regards

Balram

trdandamudi
Master II
Master II

I used your sample app and added 1,040,000 records to the excel and generated the .txt file and I am not getting any special characters (").

What is the volume  or number of records you have on your side ?