LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Excel auomation Performance problem!! Need help please!

I apologize if this is not quite the correct group for this message. Also, I
sort of posted as follow up to my original questio a couple of days ago but
have since determined that this is problem I really need an answer to. ( I
will be cross posting just to have a chance for a more reponses)

I am automating Excel using C# in VS2005. I am NOT using VSTO. I need
support Excel 2000 through Excel 2007 so I am using 'late binding' via
reflection and developing with an Excel 2000 reference.

I need to perform a replace of about 100 different values, but I can be
guranteed that these values will alway be in the same place and I also have
been told that using named ranges is not likely to be allowed. So this
replace has to occur over the used area of sheet. Doing this with Excel
hidden and without user access, is extremely slow (if I use a specific named
range, it has acceptable performance). I also know that I can pull a Range
of values in an object array in C#, replace them in the array and then
repopulate the array, but this is again requires knowing the range.

It was decided to try and use an embedded macro that launch to do the
replacement so that the Replace is not occurring via the interop and COM.
Manually, opening Excel and executing the macro has performance that is more
than acceptable.

So I tried this automated with Excel hidden, and performance was extremely
poor about the same as with the replace via interop automation. A minute
plus to complete what took a second or two when launched manually. I then
made Excel visible and had the same performace problem. Finally, I ran the
application again with Excel visible and then I manully clicked Excel, giving
it focus. The macro immediately sped up and finished in a second or two.

So my questions a

- Has anyone seen this behavior for?
- Does anyone know why this is the case?
- Most, importantly is there a way around this?

The requirement is to run Excel hidden or at the very least minimized while
giving performance similar to the manual lauch of the embedded macro.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with VBA execution performance problem SaeOngJeeMa Excel Programming 3 March 18th 07 12:27 AM
Excel performance problem (Excel11.xlb file) Alain79[_3_] Excel Programming 3 April 24th 06 06:50 PM
Performance problem with VB Macro in Excell XP RayOTown Excel Programming 1 December 6th 04 05:57 PM
Excel Add-In performance problem jbicik Excel Programming 0 November 17th 04 12:41 AM
problem with performance of excel macro, pls help lee777[_2_] Excel Programming 1 June 18th 04 11:47 AM


All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"