mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #122] Support for NaN, Inf, -Inf #101
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jeroen on GitHub (Aug 22, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/122
Originally assigned to: @jmcnamara on GitHub.
Would it be possible to add a line to the
worksheet_write_numberdocumentation if excel supports special valuesNaN,Inf, and-Inf. I just tried:Which does not raise an error in lxw, however when I open the file in excel it gives an error that it is "damaged".
@jmcnamara commented on GitHub (Aug 22, 2017):
Excel doesn't support
NaN,Infor-Infas a value. It does support them as the result of a formula but not as a number.I can add something to the docs to say Excel, and thus libxlsxwriter, doesn't support them but, for performance reasons, I won't add a check. The end user can do it in their application if they need it.
@jeroen commented on GitHub (Aug 22, 2017):
OK thanks. I figured this from trying but wasn't sure. The weird thing is that if you insert
INFINITYorNAN, excel first shows a warning that the document is damanged, but then does properly displaynanorinfinside the cell, making it look as if it can be supported.@jmcnamara commented on GitHub (Aug 22, 2017):
Yes, but they are just converted to strings, right? As I said Excel doesn't support them as numbers.
You can handle the values as strings in your application in a similar way if you like.
Btw, what lib/application are you using libxlsxwriter in. I see that you have a very active GitHub timeline. :-)
@jeroen commented on GitHub (Aug 22, 2017):
I am writing bindings for R: https://github.com/ropensci/writexl
@jmcnamara commented on GitHub (Aug 30, 2017):
Cool.
Could you add
libxlsxwriteras a "topic" under the title of your GitHub project like in libxlsxwriter so that your project shows up in this list.I've added a note about handling (or not handling) NaN, Inf or -Inf to the worksheet_write_number() docs.
Thanks.
@jeroen commented on GitHub (Aug 30, 2017):
OK I have added the topic to the repo.