[Resolved] Excel Automation – Excel Attaches itself to my Excel Object!
xlApp.IgnoreRemoteRequests = True
http://www.xtremevbtalk.com/showthread.php?p=997013#post997013
---
Hello All!
I am using Office Automation in one of my applications in order to read/write to an excel spreadsheet from a VB.Net application.
I thus create the application with
ExcelApplication = New Excel.Application()
I wish to keep my application hidden, and thus I use
ExcelApplication.Visible = False
This all works fine. Excel stays hidden (although it does show in the process list – I can live with this). However, the problem occurs when the user loads a workbook outside of my application.
Excel attaches itself to my ExcelApplication Object !! What’s worse is that it makes my currently hidden workbook visible.
Initially I considered that I could just hide individual workbooks. However, there are two problems with this approach.
1. I with to set ExcelCalculation to manual, and this is an application wide property. If I allow Excel to attach itself to my excel object then I will have no choice but to set ExcelCalculation to automatic, slowing things down (some of the calculations being performed by excel are fairly involved)
2. When the user closes the application (with hidden workbooks), the process will die. I can always check for this and reload excel – but this is an acquired solution and it will be compounded by the calculation issues described in (1).
Ideally, what I want to do is stop Excel attaching itself to my Excel instance. However, any suggestions would be more than welcome.
Thank you in advance
Darren Barrick
xlApp.IgnoreRemoteRequests = True
http://www.xtremevbtalk.com/showthread.php?p=997013#post997013
---
Hello All!
I am using Office Automation in one of my applications in order to read/write to an excel spreadsheet from a VB.Net application.
I thus create the application with
ExcelApplication = New Excel.Application()
I wish to keep my application hidden, and thus I use
ExcelApplication.Visible = False
This all works fine. Excel stays hidden (although it does show in the process list – I can live with this). However, the problem occurs when the user loads a workbook outside of my application.
Excel attaches itself to my ExcelApplication Object !! What’s worse is that it makes my currently hidden workbook visible.
Initially I considered that I could just hide individual workbooks. However, there are two problems with this approach.
1. I with to set ExcelCalculation to manual, and this is an application wide property. If I allow Excel to attach itself to my excel object then I will have no choice but to set ExcelCalculation to automatic, slowing things down (some of the calculations being performed by excel are fairly involved)
2. When the user closes the application (with hidden workbooks), the process will die. I can always check for this and reload excel – but this is an acquired solution and it will be compounded by the calculation issues described in (1).
Ideally, what I want to do is stop Excel attaching itself to my Excel instance. However, any suggestions would be more than welcome.
Thank you in advance
Darren Barrick
Last edited: