Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
450
Error : Excel found unreadable content in 'filename.xlsx'.....
posted

Hi,

When I try to open excel file generated using Infragistics.Excel - I am getting below exception....

"Excel found unreadable content in 'filename.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, Click Yes"

After Repaired it shows in repair log - "Repaired Records: Worksheet properties from /xl/worksheets/sheet1.xml part"

After my analysis on the issue i found below line of code causing the issue.

workSheet.PrintOptions.InsertPageBreak(workSheet.Rows[headerRow]);

 

Part of my code FYR...

 

workSheet.PrintOptions.InsertPageBreak(workSheet.Rows[headerRow]);

workSheet.PrintOptions.InsertPageBreak(workSheet.Columns[reportSet.Tables[0].Columns.Count]);

workSheet.PrintOptions.Orientation = Infragistics.Documents.Excel.

Orientation.Landscape;

workSheet.PrintOptions.PaperSize =

PaperSize.Legal;

workSheet.PrintOptions.LeftMargin = 0.2;

workSheet.PrintOptions.RightMargin = 0.2;

workSheet.PrintOptions.ScalingFactor = 72;

 

Parents
No Data
Reply
  • 53790
    posted

    Hello vbalingula,

    Thanks for provided code. I try to reproduce your issue using your code and our latest available version: 12.1.20121.2054, but I think that everything works properly. I made small sample and few test, but I`m not able to reproduce your issue. Could you please tell me what is your current version and do you have any installed service release and which one.

    Also please take  a look at the attached sample and video file for more details and let me know if you think that I didn`t reproduce your scenario. Please feel free to modify this sample to re[produce your issue and revert it back to me. I`ll be glad to research it for your.

    Let me know if you have any questions.

    Regards

    video 030.part01.rar
Children