Forum Discussion
chrisparkinsonarthouse
Jul 27, 2022Copper Contributor
Excel Online Script to add row with formula
Hi All, Ive got a workbook saved to a SharePoint folder. In the workbook is a script. See below. Its the part in bold i need help with. Basically the script needs to add a header to the...
- Jul 28, 2022You simply add this line of code immediately below that last one:
selectedSheet.getCell(theRow, 1).setFormula("=ROW()");
chrisparkinsonarthouse
Jul 28, 2022Copper Contributor
JKPieterse Hi,
Amazing, so the script adds 99 to column A at the bottom of the row. Which is great.
Now i need in Column B same row to be the formula =ROW()
.
Is this possible?
JKPieterse
Jul 28, 2022Silver Contributor
You simply add this line of code immediately below that last one:
selectedSheet.getCell(theRow, 1).setFormula("=ROW()");
selectedSheet.getCell(theRow, 1).setFormula("=ROW()");
- chrisparkinsonarthouseJul 28, 2022Copper Contributor