Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Problem with the double quotes " in export to text file

Hello,

I am facing a problem with the export of the data in text file with the following script

EXPORT_TXT:

LOAD left(Store,4) & repeat(' ', 4-len(Store)) &

     left(Item,10) & repeat(' ', 10-len(Item)) &

     left(Item_Descr,35) & repeat(' ', 35-len(Item_Descr)) &

     left(Qty,11) & repeat(' ', 11-len(Qty)) &

     left(Sales,14) & repeat(' ', 14-len(Sales)) &

     left(Price,14) & repeat(' ', 14-len(Price)) &

     left(Barcode,14) & repeat(' ', 14-len(Barcode)) &

     left(Secteur,3) & repeat(' ', 3-len(Secteur)) &

     left(Rayon,4) & repeat(' ', 4-len(Rayon)) &

     left(Family,4) & repeat(' ', 4-len(Family)) &

     left(Subfamily,4) & repeat(' ', 4-len(Subfamily)) &

     left(Ub,4) & repeat(' ', 4-len(Ub)) &

     left(Ub,3) & repeat(' ', 3-len(Ub)) as Field

    

FROM C:\SALES_EXPORT.qvd (qvd);

Store EXPORT_TXT Into C:\Sales_Results.txt (txt, codepage is 1252, no labels, delimiter is '\t', no quotes);

in the text file in some lines appears the double quotes symbol "

how can i avoid this symbol and keep the grading of the file same, because i have to export the data in specific field length and the double quote destroys this grading

Thank you in advance.

3 Replies
Sergey_Shuklin
Specialist
Specialist

Hello!

Before using some extract functions like Left() or Len() and so on, use Replace() function to remove unnecessary chars (in your instance it's a double quotes).

Like this:

Replace(Your_String,'"','')

P.S.:

You also may use functions Ord() and Chr() to remove some specific symbols.

Anil_Babu_Samineni

What are you doing here

Store EXPORT_TXT Into C:\Sales_Results.txt (txt, codepage is 1252, no labels, delimiter is '\t', no quotes);

OR try this?

Store EXPORT_TXT Into C:\Sales_Results.txt

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
its_anandrjs

By seeing your code it seems you are looking for the data to be store in the TXT format, so for this, you don't convert the store expression into text format you have to do to this

Your store command:-

Store EXPORT_TXT Into C:\Sales_Results.csv (txt);

EXPORT_TXT:

LOAD

    left(Store,4) & repeat(' ', 4-len(Store)) &

    left(Item,10) & repeat(' ', 10-len(Item)) &

    left(Item_Descr,35) & repeat(' ', 35-len(Item_Descr)) &

    left(Qty,11) & repeat(' ', 11-len(Qty)) &

    left(Sales,14) & repeat(' ', 14-len(Sales)) &

    left(Price,14) & repeat(' ', 14-len(Price)) &

    left(Barcode,14) & repeat(' ', 14-len(Barcode)) &

    left(Secteur,3) & repeat(' ', 3-len(Secteur)) &

    left(Rayon,4) & repeat(' ', 4-len(Rayon)) &

    left(Family,4) & repeat(' ', 4-len(Family)) &

    left(Subfamily,4) & repeat(' ', 4-len(Subfamily)) &

    left(Ub,4) & repeat(' ', 4-len(Ub)) &

    left(Ub,3) & repeat(' ', 3-len(Ub)) as Field

 

FROM C:\SALES_EXPORT.qvd (qvd);

Store EXPORT_TXT Into C:\Sales_Results.csv (txt);