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) — at Version 4

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 (4)

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)
Note: See TracTickets for help on using tickets.