ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel throws -2147417851 (80010105) The server threw an exception. for no apparent reason (https://www.excelbanter.com/excel-programming/373090-excel-throws-2147417851-80010105-server-threw-exception-no-apparent-reason.html)

Lars-Erik Aabech

Excel throws -2147417851 (80010105) The server threw an exception. for no apparent reason
 
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



NickHK

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

http://support.microsoft.com/kb/q177991/
http://groups.google.co.uk/group/mic...574a5f 04e11a


NickHK


"Lars-Erik Aabech" wrote in message
...
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





Lars-Erik Aabech

Excel throws -2147417851 (80010105) The server threw an exception. for no apparent reason
 
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


"NickHK" wrote in message
...
Does these help ?

http://support.microsoft.com/kb/q177991/
http://groups.google.co.uk/group/mic...574a5f 04e11a


NickHK


"Lars-Erik Aabech" wrote in message
...
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








All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com