Carlos Cifuentes
AngularJS library migration · CSV and Excel export

Migrating ng-csv / export helpers to modern Angular

ng-csv added a directive that turned an array into a downloadable CSV file from a button. It is tied to AngularJS.

What replaces it

OptionWhen to choose it
A small export function with BlobCSV needs no library: build the text, create a Blob and trigger a download.
PapaParseWhen you also parse CSV, or want quoting and escaping handled by a tested library.
SheetJS or server-side exportFor real .xlsx files; install SheetJS as its documentation says, because the copy on the npm registry is old, or generate large files on the server.

How to migrate it

  1. List every export: columns, headers, separator, date and number formats, and file name.
  2. Write one ExportService with a typed column definition and reuse it from every table.
  3. Compare the new files with the old ones in the spreadsheet program your users actually use.

Watch out. Add a UTF-8 byte order mark so Excel shows accented characters correctly, and escape cells that start with =, +, - or @ to avoid formula injection.

Other libraries

Planning a migration or a micro-frontend platform?

In a 20-minute call you describe your situation and I tell you how I'd approach it. If it isn't worth doing yet, I'll say so.

Message me on LinkedIn