csv format on export via scripting

320 viewsScripting


I have an issue using a script to export a matrix to a csv file. If I would normally export via File>Export>Delimited Text File and then import and select US-ASCII and change the regional setting to my country all is fine. However using a script to all this, things go wrong with the format of a date character. Changing the regional setting on the importfile doesn’t do the trick. I think the issue has to do with the fact on normal export I can choose “Export formatted numbers” and I don’t know how to write that in the script. See below the script I use:

model.exportDelimitedText().onlyViews("Sales History").includeColumnHeaders().includeRowHeaders().export("C:\\U

If someone can help me how to adjust the script including the “Export formatted numbers” I would be very grateful.

Gilbert Answered question April 16, 2024

Hi Robert,

It seems that the property “Export formatted numbers” can not be set via script. I think this is a reasonable feature request to send to Quantrix.

As I workaround, I suggest to manually format the date into text, and then export the text.

In this example, the column “ManualFormat” will be exported without retaining the format, but the column “ToString” should work.

Hope this helps as a workaround.

Greetings, Gilbert

Gilbert Answered question April 16, 2024
You are viewing 1 out of 1 answers, click here to view all answers.

Latest Questions