Opened 9 years ago

Last modified 6 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: adeas31 Owned by: adrpo
Priority: high Milestone: Future
Component: Run-time Version: trunk
Keywords: Cc: Manfred.Rode@…, lochel, vitalij

Description (last modified by adrpo)

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 Changed 9 years ago by Christoph <buchner@…>

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

comment:2 Changed 9 years ago by adrpo

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 Changed 9 years ago by rfranke

  • 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 Changed 9 years ago by adrpo

  • Cc lochel vitalij added
  • Description modified (diff)
  • Status changed from new to accepted
  • Summary changed from Change the external input csv file delimiter to Make possible to change the csv file delimiter char and quote char (for input file and output file)

comment:5 Changed 9 years ago by sjoelund.se

  • Milestone changed from 1.9.3 to 1.9.4

Moved to new milestone 1.9.4

comment:6 Changed 8 years ago by vitalij

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

comment:7 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.4 to 1.9.5

Milestone pushed to 1.9.5

comment:8 Changed 8 years ago by sjoelund.se

  • Milestone changed from 1.9.5 to 1.10.0

Milestone renamed

comment:9 Changed 7 years ago by sjoelund.se

  • Milestone changed from 1.10.0 to 1.11.0

Ticket retargeted after milestone closed

comment:10 Changed 7 years ago by sjoelund.se

  • Milestone changed from 1.11.0 to 1.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:11 Changed 6 years ago by casella

  • Milestone changed from 1.12.0 to Future

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.