Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Excel 2003 + Solver + C#


Sorry for the cross post but I need an answer to this
ASAP and wasn't sure which newsgroup is the most relevant
since this problem covers a number of areas.

Problem:
How to automate Excel 2003 with C# and use the Excel
Solver add-in.

I've setup a spreadsheet that has a number of cells
within it that I must populate through automation, I then
have a macro that performs a Solver function on these
cells and produces an answer which I then must retrieve.

The spreadsheet, Solver and the macro all work fine when
opened independently not using automation with C#.

Further the cells are populated and the macro is called
no problem with automation.

The problem comes when the C# program calls the Excel
macro that calls the Solver function, I get the
infamous "Solver: An unexpected internal error occurred,
or available memory was exhausted." error message.

This happens every the time.

HOWEVER if I pause the C# program (with Excel visible)
just before calling the macro, open the Tools-Solver
dialogue and immediately close it without performing a
Solve, and then let the C# program perform the macro it
works fine.

So it looks like Solver may not be getting initialised
properly.

One thing to note, this works fine using VB6 and Excel +
Solver, we've only hit problems with .Net and Excel +
Solver.

Anyone with any ideas, anyone from the Office2003 + .Net
interop?

We'll have to rewrite this functionality using VB if we
cannot resolve this, bit of a backward step!

Many thanks

David


Reply
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
Excel 2003 + Solver xxsawer Excel Worksheet Functions 3 December 8th 09 10:20 AM
Excel 2003 - Calculation production schedule using solver Blurz Excel Worksheet Functions 0 September 8th 07 01:00 PM
how do you use solver in excel 2003 Larry Orange Excel Discussion (Misc queries) 3 November 3rd 06 01:35 PM
How can I install Excel Solver without the Office 2003 disk? Steph Excel Worksheet Functions 3 September 22nd 06 07:35 PM
Solver Adds in Microsoft Edition 2003 (student version) Derl New Users to Excel 1 December 3rd 04 06:37 AM


All times are GMT +1. The time now is 11:39 AM.

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"