Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am automating Excel 2000 from a MFC program prepared in VC++2003 and
running in Win2K. Is C++ allowed here? I fill 2 COleSafeArray objects with data and pass them to Excel as follows: oRange.put_Value(COleVariant(saValues)); oRange.put_NumberFormat(COleVariant(saNumFormat)); For small ranges, this works fine; but when the range gets to a certain size, say 750 rows and 8 columns, put_NumerFormat() returns an exception with code 0x80020005. This happens for put_NumberFormat only, not for put_Value. This does not seem to depend on the contents of saNumFormat. It can be empty or filled compeletely with a simple format, "0", and the same thing happens. No cells in Excel receive a number format. If I run the same program from an XP machine with Excel 2003 installed the problem goes away. So someday this will not be a problem. But for now I need to support the earlier versions. Anyone know about this behavior and a way to avoid it? Thanks, Bill Below |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Retrieve Excel Cell Range into SAFEARRAY (VC++) | Excel Programming | |||
Passing large number of variables to function | Excel Programming | |||
SAFEARRAY [in] and [out] | Excel Programming | |||
Excel VBA - Problem calculating and passing values to another worksheet | Excel Programming | |||
Fill a Range with VB SafeArray | Excel Programming |