You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last record in the file may or may not have an ending line break..
Google Sheets that are exported as CSV, do not contain a trailing line break. Also, Google Sheets are exported in a "Windows format" and I need to set setLineSeparator("\r\n") in CsvWriterSettings to create a matching CSV file.
When writing CSV files with univocity, I was trying to recreate the Google Sheets format exactly (to be able to diff CSV files). This does not seem to be (easily) possible right now. I can get somewhat close by setting setNormalizedNewline('\n'), which will not create the last line but it will still create the carriage return character.
Would it be possible to have an option on CsvWriterSettings to set something like setEndingLineSeparator(false)?
In Common Format and MIME Type for Comma-Separated Values (CSV) Files it is stated:
The last record in the file may or may not have an ending line break.
.Google Sheets that are exported as CSV, do not contain a trailing line break. Also, Google Sheets are exported in a "Windows format" and I need to set
setLineSeparator("\r\n")
inCsvWriterSettings
to create a matching CSV file.When writing CSV files with univocity, I was trying to recreate the Google Sheets format exactly (to be able to diff CSV files). This does not seem to be (easily) possible right now. I can get somewhat close by setting
setNormalizedNewline('\n')
, which will not create the last line but it will still create the carriage return character.Would it be possible to have an option on
CsvWriterSettings
to set something likesetEndingLineSeparator(false)
?This issue may be related to #388
The text was updated successfully, but these errors were encountered: