Hi,
I received an error - "The array formula is already applied to a cell range. Clear the existing cell range first." The Infragistics excel engine does not have clear method which clear the existing cell range. Do you have any ways to clear this cell range?
Hi brusckowski,
Let me know if you have any further questions on what Andrew posted.
Well if you're getting this error while you are trying to set the value of a specific cell then I assume you have the index of the row in question and the cell index within that row for which you were getting the error you mentioned. In which case you would get that formula using the GetCellFormula method, cast it to ArrayFormula and call ClearCellRange if you want to clear that cell and all the cells to which the ArrayFormula is applied. The code would look something like: ((ArrayFormula)ws.Rows[rowIndex].GetCellFormula(columnIndex)).ClearCellRange(); where ws is the Worksheet, rowIndex is the index of the row you were trying to change and columnIndex is the index of the cell within that row for which you have an array formula assigned.
Can you please give me sample code?
You can get the ArrayFormula (e.g. using the WorksheetRow's GetCellFormula method and casting to ArrayFormula) and then use the ArrayFormula's ClearCellRange method.