Modified from past GUI program assignment.
Getting struggle with Excel which removes the leading zero by default, and encoding problems. I just want to have a lightweight CSV editor which displays the raw data and have a file explorer.
- Java Runtime Environment 8
Run in Command line: java -jar JCSVEditor.jar
- Directly open with UTF-8 encoding, and any encodings that JRE supports
- Do not lock the file, just refresh the file.
- Raw text of the csv file, no formatting so no more removal of leading zero.
- Supports cell value with line breaks
- Supports all common line breaks
- Windows:
\r\n
- Mac:
\r
- Linux:
\n
- Windows:
Note:
- Excel can display the data with correct encoding using Import from Text approach
- Excel 2016 seems to be able to directly open the CSV correctly with UTF8 BOM
- Or PowerShell in windows (I think this only supports utf8):
Import-Csv .\utf8.csv | Out-GridView
,
, line break should be embedded inside"
and"
"
should be escaped inside"
and"
as""
,
This is "great performance
=>"This is ""great performance"
- The input file should be a valid csv format, with no leading and no trailing empty row.
- Problem with saving utf 8 with bom file, the invisible byte order mask is embedded in the cell value, need to remove the byte order mask
- The line break embedded inside double always is
\n
- Better error handling
- Remove the byte order mask with saving utf 8 with bom