Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Excel AutoRecover not working with Excel Interop

$
0
0

I have a simple C# application where I am creating an instance of an Excel application and opening a document using it. Here is the code I am using :

m_excelApplication = new Microsoft.Office.Interop.Excel.Application(); // m_excelApplication is the Excel application object m_excelApplication.Workbooks.Open(templatePath); // templatePath is of the form "C:\\Users\\Developer\\abc.xls";

m_excelApplication.Visible = true;

The document opens successfully. However, when I make some changes in the document (the changes are not saved) and wait for the Auto Recovery to fire, no AutoRecovery file is created at the specified location (the location specified under Options->Save->AutoRecover File Location).

I have also verified that the AutoRecovery settings are all correct (the AutoRecovery information is saved every 1 minute and "Disable AutoRecover for this workbook only" is not checked)

I also verified that AutoRecovery is working for documents which are not opened through the above code (i.e I closed all excel instances and opened a simple Excel document from the desktop and made some changes in it. After 1 minute, an  autorecovered file is being created for this opened document)

Has anyone else had this problem in regards to autoRecovery not working? As mentioned, this is specifically happening for Excel application instances created using Excel Interop? I am using Excel 2010.

Thanks,

Akshay




Viewing all articles
Browse latest Browse all 2257

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>