sheetjs icon indicating copy to clipboard operation
sheetjs copied to clipboard

Grinding rawNumbers to separate options

Open PavelKoroteev opened this issue 3 years ago • 1 comments

I have issue with some number column in excel with custom formatting, whose do display the same as General format in Excel Viewer, but whose add $ prefix to csv value, when I get cvs from this file.

[$-ru-RU]0

With

rawNumbers: true

I successful get just number from number cell (get cell.v instead of cell.w).

But I have issue from date field, whose with this option returned as numbers.

Should we do more clarify options for this case?

PavelKoroteev avatar Jul 27 '22 13:07 PavelKoroteev

Under the hood, Excel actually stores numbers. The number format is what makes values act like dates.

If the origin of the worksheet is a file (you called read or readFile somewhere), you should be able to pass the option cellDates: true to keep date objects rather than the date codes.

SheetJSDev avatar Jul 27 '22 22:07 SheetJSDev