Standalone Office Open XML files (Microsoft Office 2007 and later) generator for Word (docx), PowerPoint (pptx) and Excell (xlsx) in javascript. The output is a stream.
The reason this comes up is we are populating the sheet from a db query, so the null comes straight out of the DB. A null value has a different meaning then a 0 in this context.
Environment
node -v
: v12.14.1npm -v
: 6.13.6npm ls officegen
: -- officegen@0.6.3Steps to Reproduce
Expected Behavior
I would expect that null would produce an empty string, and be handled the same way as undefined.
Actual Behavior
Null results in the value 0
In column A2 the value is null, column B2 is undefined. I would expect these to share the same behavior.
The relevant code is https://github.com/Ziv-Barber/officegen/blob/master/lib/xlsx/genxlsx.js#L477 to fix would just need to explicitly handle the null case. I can put a PR together, but wanted to start with an issue in case this is intended behavior.
The reason this comes up is we are populating the sheet from a db query, so the null comes straight out of the DB. A null value has a different meaning then a 0 in this context.