Skip to content

Commit

Permalink
Corrected sheet index adjustment
Browse files Browse the repository at this point in the history
The various Range types are 0 index as they're arrays.
However the getCell and getIndex functions use 1-indexed values.

As 0-indices are unambiguous in serialized form this normalizes we
use that for normalization.
  • Loading branch information
George Hicken committed Feb 19, 2024
1 parent 4e7fb80 commit 1e8202e
Show file tree
Hide file tree
Showing 5 changed files with 703 additions and 703 deletions.
4 changes: 2 additions & 2 deletions worksheet/export.gs
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ function processSheet(workbook, sheet) {
var _ = "debugger breakpoint line"
}

// getCell is 1 indexed... For! Some! Reason!
// getCell is 1 indexed... For! Some! Reason! as is sheet.getIndex()
var cell = activeRange.getCell(row+1, col+1)
var processedCell = processCell(workbook, sheet.getIndex(), cell, dataValidation[row][col])
var processedCell = processCell(workbook, sheet.getIndex()-1, cell, dataValidation[row][col])
processedSheet[row][col] = processedCell


Expand Down
Loading

0 comments on commit 1e8202e

Please sign in to comment.