FOLIO provides CSV-formatted export of tabular data in several places throughout the platform (loans, requests, fees/fines, etc.). Unfortunately, CSV files are not always opened “correctly” by the most common software users have to open CSV files: Excel. There are two problems:
- The default delimiter for CSV in Excel can vary by locale (eg. “;” is the default delimiter in a number of non-English European locales).
- Excel assumes ANSI encoding for CSV files (UTF-8 encoded characters are not rendered properly)
I would like to propose that the project undertake a refactor of how CSV and tabular data export is handled in FOLIO to make it more robust. At a minimum, we should respect the locale-based delimiter or provide an option in the UI or settings to set the delimiter used when generating the file. We should also begin including the UTF-8 or universal BOM (byte-order marking) on all of our generated CSV files to ensure that the UTF-8 character encodings are rendered correctly in Excel.
Long-term, we should provide user-selectable, multi-format exports using libraries that can directly generate valid XLS/XLSX files and TSV files, in addition to standard CSVs. Thoughts?