Skip to content

Commit 098deff

Browse files
authored
Merge pull request #7 from divamtech/ishika-lastRow-lookup-formula
lastRow for lookup formulas
2 parents 40e130e + df2dca1 commit 098deff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ async function injectFormulasIntoSheet(workbook, data, config) {
237237
const lookupKey = Array.isArray(lookupGroup) ? lookupGroup[0] : lookupGroup;
238238
const lookupColIndex = headerKeys.indexOf(lookupKey) + 1;
239239
const lookupCell = sheet.getRow(2).getCell(lookupCol);
240-
240+
lastRow= hiddenSheet.lastRow.number
241241
lookupCell.value = {
242242
formula: `IF(${primaryCell.address}="","",VLOOKUP(${primaryCell.address},${hiddenSheet.name}!$A$2:$${String.fromCharCode(
243243
64 + headerKeys.length

0 commit comments

Comments
 (0)