planet icon indicating copy to clipboard operation
planet copied to clipboard

resources: support csv files viewer (fixes #8368)

Open Mutugiii opened this issue 8 months ago β€’ 4 comments

Fixes #8368

In the planet resource viewer add support viewing csv files.

Using lightweight 3rd party package papaparse. If we want to support viewing xls/x files we can use sheetJS - xlsx.

To test:

  • stop running the dev server
  • install deps: run npm i
  • run the dev server: ng s

image

Mutugiii avatar Mar 20 '25 15:03 Mutugiii

Oops, sorry. Missed that this was a draft.

jessewashburn avatar Mar 20 '25 16:03 jessewashburn

It works for most CSV files, but when a CSV file has duplicate column names, it cannot be displayed on the screen. ζˆͺ屏2025-04-21 δΈ‹εˆ12 21 48

@Mutugiii or maybe solve it in another issue?

JunhaoZhou66 avatar Jun 03 '25 20:06 JunhaoZhou66

It works for most CSV files, but when a CSV file has duplicate column names, it cannot be displayed on the screen. ζˆͺ屏2025-04-21 δΈ‹εˆ12 21 48

Pushed a fix for this

Mutugiii avatar Jun 13 '25 17:06 Mutugiii

With headers: true you can handle blank column headers with transformHeader

(from https://www.papaparse.com/docs#config)

image

paulbert avatar Jul 08 '25 17:07 paulbert