This project has moved and is read-only. For the latest updates, please go here.

Excel found unreadable contents in 'xyz.xlsx'. Do you want to recover

Jan 30, 2012 at 11:34 AM
Edited Jan 30, 2012 at 12:31 PM

Hi, 

I am creating tables in excel sheets using InsertTable method by passing a list of object. ws.InsertTable('XYZ', true). Tables created successfully, but when i opened an excel file it show me a message,. 

'Excel Found Unreadable content in 'XYZ.xlsx'. Do you want to recover the content of this workbook? If you trust the source of this workbook, click yes.

On clicking 'Yes' another popup says,. 

'Excel was able to open the file by repairing or removing the unreadable content'.

"Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded"

and show link for log which have a message,

 

<?xml version="1.0" encoding="UTF-8" standalone="true"?>-<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error011320_01.xml</logFileName><summary>Errors were detected in file 'C:\Users\Ali Asadullah\Desktop\QuestionRecords (9).xlsx'</summary>-<additionalInfo><info>Excel completed file level validation and repair. Some parts of this workbook may have been repaired or discarded.</info></additionalInfo></recoveryLog>

When i closed the excel file after recover, its prompt me to save changes, by saying "Save As".

---------------

 

InsertTable() argument contains a list<AQuestion> of objects and each object contains 21 properties, types of properties are string, int, datetime short etc,. 

my workbook contains 4 worksheets and each worksheet contain 1 table. 

 

I can't be able to find what the error is..??

Jan 31, 2012 at 4:22 AM

Please create a new entry in the Issue Tracker and attach the file you're trying to open.

Jan 31, 2012 at 5:44 AM


Thanks Mdeleon,

file is attached with a new entry in issue tracker. 

Jan 31, 2012 at 12:52 PM
Edited Jan 31, 2012 at 12:53 PM

Thanks mdeleon,

The stated problem has been resolved. The problem is in my code.

earlier I am using Memory and Response streams to download excel file at run time,. 

Everything works fine now when i make the 'file' to download instead of response stream. 

------------------
return File(ms, 
@"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"
filename);
------------------
Thanks again.