Posted 21 August 2025, 1:38 pm EST
Hi,
I am using SpreadJS 18.1.4 version
I’m trying to apply number and date formatting to ranges of cells in SpreadJS using the .formatter() method. My approach is as follows:
javascript
[code]// For number columns
sheet.getRange(row, column, rowCount, colCount).formatter(‘#,##0.0000;-#,##0.0000’);
// For date columns
sheet.getRange(row, column, rowCount, colCount).formatter(‘MM/dd/YYYY’);[/code]
The formatting is visually applied to the range of cells, but in the SpreadJS Designer toolbar (and after exporting to Excel), the cells display Custom format instead of Number or Date type, as shown in the screenshots below (screenshot-1)
Is there a way to ensure the formatted columns are recognized as Number and Date types (not Custom) in the Designer and Excel export?
Any suggestions or best practices for this in SpreadJS would be appreciated!
Used this documentation to set the formatting types. - https://developer.mescius.com/spreadjs/docs/features/cells/cellformat/BasicFormat
Thank you.