-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 0x800A03EC when opening with Excel.Application after saving with NPOI #1308
Comments
Hi, can you please attach original file and corrupted? |
Oh, sorry. Here you have the 2 files. Hope that will help you. Corrupt file.xlsx Thank you. |
It seems to be smth wrong with shared formulas... |
Hi, here the code. I clean up it because there is a connection to DB string filename = "" //the filename goes here. XSSFWorkbook newWorkbook = new(); initializeWorkbook(ref filename, ref newWorkbook, ref excelSheet); IRow row = excelSheet.CreateRow(rowIndex); row.CreateCell(0).SetCellValue(12002219); XSSFFormulaEvaluator.EvaluateAllFormulaCells(newWorkbook); using FileStream fs = new(filename, FileMode.Create, FileAccess.Write); PrintMyExcelFile(filename); //this code initialize the document
} //this code is for printing but crash at the line : Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets[1];
} Hope you will have the possibility to reproduce the error and fix it. |
The bug was already fixed in #1291 |
NPOI Version 2.7.0
File Type
Upload the Excel File
Reproduce Steps
I open a file with formulas in it. I change the value of 2 cells and after I call XSSFFormulaEvaluator.EvaluateAllFormulaCells(newWorkbook);
after that I open the file with the MS Excel Interop (here is my code)
"Excel.Application excelApp = new();
Excel.Workbook wb = excelApp.Workbooks.Open(fileName,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Excel.Worksheet ws = (Excel.Worksheet)wb.Worksheets[1];"
And on the last line the application crash with error code : 0x800A03EC
Issue Description
If I open the file in Excel, Excel says the file is corrupt and he fix it the the message : "remove /xl/calcChain.xml"
I rollback to 2.6.2 and the Excel files are not corrupt anymore.
thank you.
The text was updated successfully, but these errors were encountered: