应用程序从多个文件生成 Excel 文档并产生以下错误
System.Runtime.InteropServices.COMException HRESULT 0x800A03EC
public void Off(Excel.Application application)
{
application.EnableEvents = true;
application.Calculation = Excel.XlCalculation.xlCalculationAutomatic; // Error HRESULT 0x800A03EC
application.DisplayAlerts = true;
application.DisplayStatusBar = true;
application.ScreenUpdating = true;
}
我尝试在互联网上搜索,但没有给出任何结果。
官方文档说出现这个错误:
“当使用需要指定列的 Excel 操作时, 行或两者,列索引必须大于零且小于 16,385,或者列字母必须属于 A 和 XFD。此外,行索引必须大于零且小于 超过 1,048,577。”