🐛 Fix issue with Google Sheets update with custom key row #1736

This commit is contained in:
Jan Oberhauser 2021-05-09 14:15:47 -05:00
parent b47f4bc012
commit afce58c19a

View file

@ -286,7 +286,7 @@ export class GoogleSheet {
throw new NodeOperationError(this.executeFunctions.getNode(), `The range "${range}" is not valid.`);
}
const keyRowRange = `${sheet ? sheet + '!' : ''}${rangeStartSplit[1]}${dataStartRowIndex}:${rangeEndSplit[1]}${dataStartRowIndex}`;
const keyRowRange = `${sheet ? sheet + '!' : ''}${rangeStartSplit[1]}${keyRowIndex + 1}:${rangeEndSplit[1]}${keyRowIndex + 1}`;
const sheetDatakeyRow = await this.getData(this.encodeRange(keyRowRange), valueRenderMode);
@ -302,7 +302,7 @@ export class GoogleSheet {
throw new NodeOperationError(this.executeFunctions.getNode(), `Could not find column for key "${indexKey}"!`);
}
const startRowIndex = rangeStartSplit[2] || '';
const startRowIndex = rangeStartSplit[2] || dataStartRowIndex;
const endRowIndex = rangeEndSplit[2] || '';
const keyColumn = this.getColumnWithOffset(rangeStartSplit[1], keyIndex);