Posted 31 July 2019, 5:25 pm EST
I have run into an error setting a simple formula to a cell. The error is
Message=‘RC[-5]-RC[-1]’ is not a valid formula.
Error offset: 0
The line of code is:
sht.Cells.Get(r, c).Formula = “RC[-5]-RC[-1]”
The refernce style is set:
sht.ReferenceStyle = Spread.Model.ReferenceStyle.R1C1
Any ideas why this would be causing an exception?
I’m using v12.45.20191.0 and Visual Studio 2017