Opened 10 years ago

Last modified 7 years ago

#3227 accepted enhancement

Make possible to change the csv file delimiter char and quote char (for input file and output file)

Reported by: Adeel Asghar Owned by: Adrian Pop
Priority: high Milestone: Future
Component: Run-time Version: trunk
Keywords: Cc: Manfred.Rode@…, Lennart Ochel, Vitalij Ruge

Description (last modified by Adrian Pop)

Currently there seems to be 4 separate implementations for the csv files:

  1. input file externalInput.csv uses space as a delimiter
  2. input file for optimization uses space as a delimiter
  3. writing output results to the csv file is done using delimiter ","
  4. reading results from the results file uses comma as delimiter (libcsv.c)

All these 4 different implementations should be based on libcsv.c which is the most configurable and one should be able to set the csv delimiter char and the quote char from command line.

Change History (11)

comment:1 by Christoph <buchner@…>, 10 years ago

Tabs are also often used as a delimiter, so it would be great if this would be configurable/flexible.

comment:2 by Adrian Pop, 10 years ago

We agree. We had a discussion about it today and I'll see about adding a -csvDelimiter='char' so that we can configure it from command line.

comment:3 by Rüdiger Franke, 10 years ago

Cc: Manfred.Rode@… added

Tab appears to be the best default delimiter, because it is unique in the whole world.

Spaces might easily be used inside names or date/time formats. Comma is used as decimal delimiter in some countries; as thousands seperator in others. Semicolon is not understood by people who prefer a comma as delimiter ...

With tab delimiters one can even copy/paste the file into an Excel spreadsheet, because this increments the cell without any custom format settings.

comment:4 by Adrian Pop, 10 years ago

Cc: Lennart Ochel Vitalij Ruge added
Description: modified (diff)
Status: newaccepted
Summary: Change the external input csv file delimiterMake possible to change the csv file delimiter char and quote char (for input file and output file)

comment:5 by Martin Sjölund, 9 years ago

Milestone: 1.9.31.9.4

Moved to new milestone 1.9.4

comment:6 by Vitalij Ruge, 9 years ago

added simflag -csvInput which use read_csv.c for external input (optimization and simulation).
Examplepull186

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:9 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:10 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:11 by Francesco Casella, 7 years ago

Milestone: 1.12.0Future

The milestone of this ticket has been reassigned to "Future".

If you think the issue is still valid and relevant for you, please select milestone 1.13.0 for back-end, code generation and run-time issues, or 2.0.0 for front-end issues.

If you are aware that the problem is no longer present, please select the milestone corresponding to the version of OMC you used to check that, and set the status to "worksforme".

In both cases, a short informative comment would be welcome.

Note: See TracTickets for help on using tickets.