Excel throws -2147417851 (80010105) The server threw an exception. for no apparent reason

L

Lars-Erik Aabech

Hi!

I've got a .net windows service that generate rather large excel files with
mounds of data. Lately the code has begyn to generate -2147417851 (80010105)
"The server threw an exception" exceptions for no apparent reasons.

The exception occurs when I set a range's value to a two dimentional array
of the same size. I guess the arrays have become to large, they're equal or
greater than 8500x5. (Usually 80+ in column dimension)
I use an Excel interop assembly generated for Excel 2000. (not the PIA's)

I've managed to get rid of the exception by replacing some code with lesser
range value allocations, but this slows down the process even more than it
is allready.

Anyone got any good advice?

Lars-Erik
 
L

Lars-Erik Aabech

Not really, this should apply:

Version of Passing Array to
Microsoft Excel Worksheet Range
-----------------------------------------
9.0 (Excel 2000) F

F: The maximum number of elements in the array is limited by available
memory or the Excel worksheet maximum size (65536 rows X 256 columns).
However, the maximum number of elements in the array that you can pass to
Excel using the Excel Transpose function is 5461. If you exceed this limit,
you receive the following error message:
Run-time error '13':
Type Mismatch

My arrays are smaller, and I don't use transpose..

L-E
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top