Skip to content

Commit e7d59c6

Browse files
authored
Don't include footer row in example values during mapping (#305)
Currently during mapping we identify the data range to select some examples from, but the call that is made expects an inclusive range, and we want an exclusive one. Due to the lack of options wrt range types we instead just decrement the range we want to retrieve. We may want to consider having different range types to avoid having to add/subtract one based on requirements, and perhaps make iteration and calculations easier
1 parent a663c94 commit e7d59c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/importer/src/dudk/sheets.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ exports.GetColumnValues = (sid, sheet, columnIndex, cellWidth = 30, count = 10)
211211
// Limit to just the column we want
212212
dataRange.start.column += columnIndex;
213213
dataRange.end.column = dataRange.start.column;
214+
215+
// The range passed to SessionGetInputValues is inclusive, and therefore
216+
// we end up with the first row of the selected footer. To avoid this
217+
// we will decrement the end.row to ensure we don't pull too make values.
218+
dataRange.end.row = dataRange.end.row - 1
219+
214220
let values = backend.SessionGetInputValues(
215221
sid,
216222
dataRange,

0 commit comments

Comments
 (0)