#81 Empty column when CSV ends with comma

closed-invalid
nobody
None
5
2011-10-27
2011-10-26
Roland Quast
No

OpenOffice tends to add a comma to the end of a CSV line. This produces an empty column in OpenCSV.

Example:

"firstname","surname",
"Bob","Jones",
"Alice","Smith",

Any chance of a fix? Thanks!

Discussion

  • Roland Quast
    Roland Quast
    2011-10-26

    Empty column if line ends with comma

     
    Attachments
  • Scott Conway
    Scott Conway
    2011-10-27

    You need to submit this as a defect to the openoffice project.

    I was not able to duplicate it using LibreOffice which is the updated fork of openoffice. You might also verify that you have the latest version of openoffice and update if neccessary or switch over to LibreOffice.

    If you have the latest openoffice and do not wish to try Libre Office I would recommend creating a shell script that removes the last character of each line if its a comma.

     
  • Scott Conway
    Scott Conway
    2011-10-27

    • status: open --> closed-invalid