I am developing an excel add-in with the help of Excel-DNA and facing a problem with the formula having more than 255 characters. I am pulling data from API of different tickers, all is good until Array Resizer is called. In the DoResize()
function exception is thrown at the following line of code.
//Set the formula into the whole target
formulaR1C1 = (string) XlCall.Excel(XlCall.xlfFormulaConvert, formula, true, false, ExcelMissing.Value, firstCell);
And the exception description is as follows:
Exception Type: System.InvalidCastException
Exception Message: Unable to cast object of type 'ExcelDna.Integration.ExcelError' to type 'System.String'.
I am using Excel 2013 32-bit with Excel-DNA 0.30.