Closed ERT-Kim closed 4 years ago
Ah I think I know what's going on. It has to do with fetching all cells (ie no filter) in an empty sheet. In the meantime
sheet.loadCells('A1:Z100')
Work well with the 2nd solution. Thanks.
I'm trying to recreate this so I can fix it, but am having trouble. Was there anything special about the sheet that you were reading from? Maybe you can share it (or a copy of it) with me - theozero@gmail.com
OK, I just invited you to share the copy of the sheet.
For me it's calling loadCells
twice for empty cells causes a TypeError on access
When cell is initialized with constructor default cellData
is an empty {}
, but when updated it's undefined
in:
https://github.com/theoephraim/node-google-spreadsheet/blob/786be59c75f34c9deae0b184885173c6812583ad/lib/GoogleSpreadsheetWorksheet.js#L78
thanks @vogre! I'll take a look
deploying this fix shortly. Thanks folks!
When trying to read some empty cells like this, following error occurs:
TypeError: Cannot read property 'effectiveValue' of undefined at GoogleSpreadsheetCell.get value [as value] (/app/node_modules/google-spreadsheet/lib/GoogleSpreadsheetCell.js:38:24)
One weird thing is that, for the similar code which accesses the other worksheet of same document, the value of empty cells is null and the code works fine. Maybe there is a problem getting CellData of empty cells...