Friday, 21 October 2011

Microsoft Excel Compatibility Checker Issue in c#.net

Error: Microsoft Excel Compatibility Checker

Getting the compaitiblity checker issue while saving the excel workbook component in c#.net,


This can be resolved either by setting the "CheckCompatibility" property of the excel workbook to false.

xlWorkBook.CheckCompatibility = false; 

or,

by replacing the xlFileFormat.xlWorkbookNormal to xlFileFormat.xlHtml 
  object fileType = (object)Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookNormal; 
with
  object fileType = (object)Microsoft.Office.Interop.Excel.XlFileFormat.xlHtml;

No comments:

Post a Comment