473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Excel Automation ? Excel Attaches itself to my Excel Object!

Hello All!

I am using Office Automation in one of my applications in orderto 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 inthe process list ? I can live with this). However, the problemoccurs when the user loads a workbook outside of my application.

Excel attaches itself to my ExcelApplication Object !! What?sworse is that it makes my currently hidden workbook visible.

Initially I considered that I could just hide individualworkbooks. However, there are two problems with this approach.
1. I with to set ExcelCalculation to manual, and this is anapplication wide property. If I allow Excel to attach itself tomy excel object then I will have no choice but to setExcelCalculation to automatic, slowing things down (some of thecalculations 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 reloadexcel ? but this is an acquired solution and it will becompounded by the calculation issues described in (1).

Ideally, what I want to do is stop Excel attaching itself to myExcel instance. However, any suggestions would be more thanwelcome.

Thank you in advance

Darren Barrick

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Z8IJJLSumUWADWXHds5E9w==</Id>
Jul 21 '05 #1
2 1795
RESOLVED

xlApp.IgnoreRemoteRequests = True

http://www.xtremevbtalk.com/showthre...013#post997013

"Darren Barrick via .NET 247" <an*******@dotnet247.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
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

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Z8IJJLSumUWADWXHds5E9w==</Id>
Jul 21 '05 #2
Thanks - I had the same problem.

Mike Ober.

"Darren Barrick" <da***********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
RESOLVED

xlApp.IgnoreRemoteRequests = True

http://www.xtremevbtalk.com/showthre...013#post997013

"Darren Barrick via .NET 247" <an*******@dotnet247.com> wrote in message
news:ee**************@TK2MSFTNGP10.phx.gbl...
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

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Z8IJJLSumUWADWXHds5E9w==</Id>


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Otie | last post by:
I found the following under the GetObject help notes and in the example for GetObject: "This example uses the GetObject function to get a reference to a specific Microsoft Excel worksheet...
6
by: Matthew Wieder | last post by:
I have the following requirements: Build a stand-alone C# application that asks the user to click in a cell in an Excel spreadsheet, and then displays the address of that cell in the C#...
12
by: D. Shane Fowlkes | last post by:
This most likely belongs in another forum but I thought I'd start here. I have a COM Object written in VB6. The DLL will access MS Excel and use it's Object Library to write a customized report...
12
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is...
1
by: Robin Tucker | last post by:
Heres and interesting problem: I have a VB.NET program that creates reports via. Word Automation. This all works fine. What I want to do as part of this report generation process is to embed a...
5
by: Tim Frawley | last post by:
I created a .NET Com Class object for use in ASP reports to export database results directly to Excel. I have it all working just find but I cannot get the Excel process to go away after the job...
6
by: a.theil | last post by:
Please help! I need a simple excel automation, just 2 write some files into excel. I do: Dim oXL As Excel.Application Dim oWB As Excel.Workbook Dim oSheet As Excel.Worksheet Dim oRng As...
2
by: Darren Barrick via .NET 247 | last post by:
Hello All! I am using Office Automation in one of my applications in orderto read/write to an excel spreadsheet from a VB.Net application. I thus create the application with ExcelApplication...
1
by: webgirl | last post by:
Hi everyone, I have a weird problem with some Word/Excel automation code that I run from Access (not sure if I should therefore post this in the Access forum..? Thought I'd try here first) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.