1金币
在saveexcel过程中报错,我的源码是这样的。我想知道这是什么原因,实际上我只进行了写入数据和存储的操作,有时存储会报错,
报错内容:
System.ApplicationException: Error saving Excel file ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at GrapeCity.CalcEngine.EvaluationContext.AllocValue()
at GrapeCity.Spreadsheet.FormulaData.a(CalculationEngine A_0, SpreadEvaluationContext A_1, Int32 A_2, Boolean A_3, Boolean A_4)
at GrapeCity.Spreadsheet.FormulaData.Calculate(CalculationEngine calcEngine, SpreadEvaluationContext context, Int32 rowIndex, Boolean normalCalculating, Boolean allowSpilling)
at GrapeCity.Spreadsheet.ColumnData.StartGettingFormulaValue(Int32 row, Int32& formulaDataArrayIndex)
at GrapeCity.Spreadsheet.ColumnData.DataEntry.GetValue(ColumnData columnData, Int32 row)
at GrapeCity.Spreadsheet.Win.SpreadWorksheet.Export_AdjustWorksheetStyleStorage(Boolean isSaveAlternatingRowStyles, Boolean preferTextOnExport, Boolean isSaveAsViewed)
at rh.a(Stream A_0, ExportContext A_1, Boolean A_2)
at rh.a(Stream A_0, FileFormat A_1, String A_2, ExportContext A_3)
at GrapeCity.Spreadsheet.Workbook.SaveAs(Stream stream, FileFormat fileFormat, String password, ExportContext context)
at c9.a(String A_0, Stream A_1, ExcelSaveFlags A_2, ExcelWarningList A_3, String A_4)
--- End of inner exception stack trace ---
at c9.a(String A_0, Stream A_1, ExcelSaveFlags A_2, ExcelWarningList A_3, String A_4)
at FarPoint.Win.Spread.FpSpread.SaveExcel(String fileName, ExcelSaveFlags saveFlags, ExcelWarningList warningList, String password)
at FarPoint.Win.Spread.FpSpread.SaveExcel(String fileName, ExcelSaveFlags saveFlags, String password)
at FarPoint.Win.Spread.FpSpread.SaveExcel(String fileName, ExcelSaveFlags saveFlags)
|
-
|