Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ezec1807
Creator
Creator

Store Table with extension ".csv" to "Western European" format. (Store de Tabla con extensión ".csv" en formato "Western European".)

Good afternoon! How are you? When I do a table setting Store ANSI, the exported file (.CSV extension) open with me "UTF-8" format. I need somebody please tell me how to do the Store with "Western European" format.

Thank you!!!

Script line of code:

store into test .. \ .. \ .. \ USR_FILES \ RENTA_prueba.CSV (ANSI codepage is 1252, delimiter is ';');

Translated with Google Translate - Qlik Community Administrative Team

Buenas tardes! Cómo están? Cuando hago un Store de una tabla poniendo ANSI, el archivo que exporto (con extensión .CSV) me lo abre con formato "UTF-8". Necesito por favor que alguien me diga cómo hago para hacer el Store con formato "Western European".

Muchas gracias!!!

Línea de código en Script:

store prueba into ..\..\..\USR_FILES\RENTA_prueba.CSV(ANSI, codepage is 1252, delimiter is ';');

8 Replies
marcus_sommer

It's not possible directly within a store-statement - you will need some workarounds. Have a look here:

How store txt in ANSI ?

ANSI coding in textfile from macro

- Marcus

ezec1807
Creator
Creator
Author

Good Marcus ! How are you? We clarify that I'm doing export of a " .CSV " extension. I tried to change the coding of export in the "export " tab did not work out . Now I made a macro contained in one of the links you passed me and turned out! The issue is that I have to run the macro from the script. You can tell me how to call a table created in the script instead of the object that is on the macro.

"

September tableObject = ActiveDocument.GetSheetObject ( " TB01 " )
tableObject.Export "C: \ test.csv " , "" , 0

"

Thanks a lot for the help!!!
Cheers,
Ezequiel

marcus_sommer

You couldn't run this kind of macro (which in script needs to be wrapped in a function) within the script-load because it needed an ActiveDocument which didn't exists before the reload is finished - therefore you need to trigger it externally per batch-statement or within the server-qmc per execute-statement.

If you have many from such tasks or are the amounts of data quite big then it could be worthful to consider third-party tools (for converting - the macro-solution from the above links worked but is really slow) or to change your workflow to utf-8 files or maybe to xml (export as qvx).

- Marcus

ezec1807
Creator
Creator
Author

Thanks Marcus !
I asked if a macro can be called to the fields of a table generated from the Script.

Thanks again!

Cheers,
Ezequiel

qlikviewwizard
Master II
Master II

Hi use the below statement.

Store mytable into xyz.CSV(txt);

marcus_sommer

Within the gui you could put only those fields which you needs in a tablebox and exports this object. You might need an additionally unique record-id maybe created with rowno() within the script then a tablebox will hide duplicates from your choosen field-combination.

Maybe it could be an alternatively for you to write your qv-output in a database and export it from them - if the database isn't already your target-system, see for example: Write Back to Database via ETL process (using CSV or XML)

- Marcus

ezec1807
Creator
Creator
Author

The problem is that such export in ANSI ( 1252 ) format from the need to perform the ETL, because it is a task that must be carried out alone and will be automated in the console. So I tried to make a macro ( that worked), but if I automate the execution of .qvw , not the macro does not run.
Thanks Marcus !!!

Cheers,
Ezequiel

ezec1807
Creator
Creator
Author

Hello! And I tried putting xyz.CSV (txt ) ... and I do not save in ANSI ( 1252 ) format.

Thank you!!!

Cheers,
Ezequiel