I\'m receiving an error when opening my OpenXML created spreadsheet. The error is as follows.
Repaired Records: Cell information from /xl/worksheets/sheet.xml p
Adding to the list of potential solutions (Year2017 :) ) :
I was facing this issue because I was not using the correct workbook object to write tothe FileOutputStream.
Hope this helps someone.
I realize this is an old thread, but I just had the same error message pop up for a programmatically generated Excel sheet also. My issue was that I had been setting the name of the worksheet with a name that had a forward slash in it.
Hopefully this helps someone else who stumbles on this thread as it's the most popular thread on the topic.
Stumbled on this issue myself and found this thread. Difference in my case could not repair the file.
Issue was row index which I passed to InsertCellInWorksheet
taken from example on MSDN.
Cell cell = InsertCellInWorksheet("A", lastRow.RowIndex, worksheetPart);
When inserting a row, make sure the index of the row is 1, not 0. However, 0 for the SheetData
collection.
sheetData.InsertAt(new Row() { RowIndex = 1 }, 0);
lastRow = sheetData.Elements<Row>().LastOrDefault();
In hope to save someone time who goes through the same trouble.
Interestingly enough, my integration test passed, however, when opening the file via Excel, it was showing the pop-up about corruption. Seems there is a row with index 0, however, bit secretive as you will not be able to open a file with Excel.
It's an old thread, however I had the same problem and it might be useful to someone like me who landed on this thread to find answer :)
The problem with me was that my application has an export module, and exported file from one environment was working fine, however from other it was not. It was the same error:
Repaired Records: Cell information from /xl/worksheets/sheet19.xml part
After doing a deep investigation, I found out that for one of the records in this sheet exceeding the cell limit of 32767 chars (excel limitation) and by reducing the size of texts on DB directly, solved the problem. :)
I hope it will help :)
Another late one - but check how you're adding cells to a row. Have you cut and paste add cell code in which there's a 'simple' compare with the existing cell reference (A1 etc) in the row? In which case if you have a cell beyond column Z - AA1 onwards - then you might end up trying to insert cell (eg) AB1) before cell B1. You'll then get this error on opening the written sheet in excel. Instead, if simply adding cell after cell along each row, just go straight to insert before with the reference cell set to null - ie. add new cell to end.
Hope that makes sense.
In my case, the SSRS place holder properties had custom number.
Fix:
Thanks Umakanth Nelige