I have formulas on an SQL server, then I successfully get them from the server to my JS code, but then I try to use my add-in and most of my formulas just won't show in Excel at all.
for(var f = 0; f < formHead.length; f++){
rngForm = sheetC.getRange(letterHead[f] + startCell + ":" + letterHead[f] + endCell);
rngForm.clear();
rngForm.formulas = [[set[f].formula]];
}
This is how I set the cells, I just need to set a single cell in a table column and the formula should get copied throughout the whole column, it's set up that way. Whether I assign range.formulas or range.values, with most formulas I need it just doesn't work, nothing happens and the cells stay empty.
Example of a formula that's working:
=[@[Need count]]-[@[Pack count]]
Three examples of formulas that aren't:
=IF(OR([@[Help Column]]="FIELD";LEFT([@Cat];1)="#");"";ROW())
=IF(AND(LEFT([@Cat];1)="#";SUMIF([Cat];r_hash([@Cat]);[Need count])>0);TEXT(ROW();"0000")&presence(r_hash([@Cat]);Box Count);IF([@[Need Count]]>0;TEXT(ROW();"0000")&",V"&presence2(ROW();Box Count);0))
=SUMIF(Data[#Headers];"Need *";Data[@])
Presence, presence2 and r_hash are custom functions. When I use them manually they work, so that is not the problem. Help column, Need count, Pack count, Cat, Box count and Need * are table column headers.
I know this isn't much to go on, but I'd be grateful for any suggestions.