I am using Excel 2007 interop assembly to automate Excel through c#. Interop version is 12.0. When I try to save a file, it can be saved only in 2003 format, but thats fine with me, yet I am getting a popup saying compatibility issue. How can I disable this popup?
I have already tried workbook.CheckCompatibility = false
and ExcelApp.DisplayAlerts = false
so please tell if I am making other mistakes.
I have MS Office 2007 installed on my computer.
Thanks in advance.
It's most likely caused by your default setting being an older version of Excel, which causes the software to only use Compatibility Mode. Open Excel and either make a new document or open an existing one. Click on the File menu. Select Options from the left-side panel.
To disable the Compatibility Checker in Microsoft Excel (for example Microsoft Excel 2007/2010): (Excel 2007) On the Office button, click Prepare, then Run Compatibility Checker, and then clear the Check compatibility when you save this workbook option.
Try ThisWorkBook.DoNotPromptForConvert = true
More info at DoNotPromptForConvert
Try instead workbook.CheckCompatibility = false;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With