If possible, how can I change the delimiter from comma to semicolon when using ServiceStack.Text.CsvSerializer?
You can control this by setting
ServiceStack.Text.CsvConfig.ItemSeperatorString = ";";
From the version 3.9.14 Release Notes:
- CsvConfig.ItemSeperatorString - Enables configuration of the separator between items in a csv file (ie | or ; rather than ,)
- CsvConfig.ItemDelimiterString - Enables configuration of the delimiter for an item that needs to be escaped in a csv file (ie | rather than ")
- CsvConfig.RowSeparatorString - Enables configuration of the delimiter for a row of items in a csv file (ie | \r\n)
Note that the setting is thread static. (Note also the misspelling.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With