我收到一个错误:HRESULT 异常:0x800A03EC 每当我将范围公式设置为:
Range range = destinationSheet.Range["A1"];
string[,] formulaString = new string[numberOfRows, 1];
range = range.Resize[numberOfRows, 1];
for (int count = 1; count <= numberOfRows; count++)
{
string worksheet = "Sheet1";
string cellRef = "A1"
string formula = string.Format("={0}!{1}", sourceSheetName, cellRef);
formulaString[count-1, 0] = formula;
}
range.set_Value(Type.Missing, formulaString);
range.Formula = range.Value; // getting exception here
这可能是什么原因