Hi,
I am trying to use Office Script to update a table with formula but am not sure how to handle double quotes.
For simplicity: here is the formula I want to set all cells in column 12 to: =if(L2="sample","yes","no")
I tried the following but the double quote is not interpreted appropriately . I tried using CHAR(34) but was unsuccessful. Please kindly assist.
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
selectedSheet.getCell(1, 12).setFormula("=if(L2="sample","yes","no");
}
I am trying to use Office Script to update a table with formula but am not sure how to handle double quotes.
For simplicity: here is the formula I want to set all cells in column 12 to: =if(L2="sample","yes","no")
I tried the following but the double quote is not interpreted appropriately . I tried using CHAR(34) but was unsuccessful. Please kindly assist.
function main(workbook: ExcelScript.Workbook) {
let selectedSheet = workbook.getActiveWorksheet();
selectedSheet.getCell(1, 12).setFormula("=if(L2="sample","yes","no");
}