node-sheets icon indicating copy to clipboard operation
node-sheets copied to clipboard

Option to not provide default values for empty cells

Open sondrele opened this issue 6 years ago • 2 comments

Hi and thanks for this small library! :) I'm using it to fetch a few sheets that has rows, many of which has optional columns in them.

This works ok by default, but when I apply formatting (e.g. number formatting) to the cells, the effectiveValue function will provide default values instead of leaving them as empty. This makes it a little harder to distinguish between a valid 0 value, and an empty value that has just been mapped to 0. (It's possible to derive whether a cell has a defined value in a cell based on whether its stringValue is defined or not, but (to me) this does not seam like the intended purpose of this field.) The same applies for currency and dates.

Would you be opposed to changing this behavior, or provide an option to only format values that actually are defined, and not set default values? Or would I be better off rolling my own implementation of this?

sondrele avatar Jan 21 '19 16:01 sondrele