node-google-spreadsheet icon indicating copy to clipboard operation
node-google-spreadsheet copied to clipboard

Question: How to force load cells?

Open Tiffceet opened this issue 3 months ago • 1 comments

Currently, using loadCells() will discard some columns if the first cell in the column is empty. Example below: image doing await sheet.loadCells('A1:C4'); would only load the first 2 columns. How do I force load all cells that I have specified to load?

Code:

await sheet.loadCells('A1:C4');
const sheetData = await sheet.getRows();
for (const row of sheetData) {
  console.log(row._rawData)
}

Output:

[ "ID", "NAME" ]
[ "1", "Name 1" ] // Missing "Other cells"
[ "1", "Name 1" ]
[ "1", "Name 1" ]

Tiffceet avatar Mar 13 '24 08:03 Tiffceet