Writing a date cell to open in Excel 2016 #904

Closed
opened 2017-11-24 19:12:08 +00:00 by james-boswell · 1 comment
james-boswell commented 2017-11-24 19:12:08 +00:00 (Migrated from github.com)

Hi,

I am using version 0.11.10 of the library and was looking for an example of writing a date cell (or column) to xls file which can then be opened by Excel 2016.

Having converted the workbook out using XLSX.utils.aoa_to_sheet and then written it out using XLSX.write, I can see that the underlying XML has set the cell with type DateTime. However, when I open the file using Excel 2016, the cell is automatically formatted as a number.

Separately I have created a date cell in Excel, saved the file and examined the underlying XML. It would appear to set a Styles element at the beginning and then set the cell with the appropriate StyleID attribute. How can the same be achieved using the library?

Any help with this would be much appreciated.
Thanks.

Hi, I am using version 0.11.10 of the library and was looking for an example of writing a date cell (or column) to xls file which can then be opened by Excel 2016. Having converted the workbook out using XLSX.utils.aoa_to_sheet and then written it out using XLSX.write, I can see that the underlying XML has set the cell with type DateTime. However, when I open the file using Excel 2016, the cell is automatically formatted as a number. Separately I have created a date cell in Excel, saved the file and examined the underlying XML. It would appear to set a Styles element at the beginning and then set the cell with the appropriate StyleID attribute. How can the same be achieved using the library? Any help with this would be much appreciated. Thanks.
reviewher commented 2017-12-27 16:33:36 +00:00 (Migrated from github.com)

Do you see the same issue with the XLSX or XLSB formats?

Do you see the same issue with the XLSX or XLSB formats?
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#904
No description provided.