Lonelypixel
Aug 6th, 2003, 01:06 AM
Hi,
I have written a small macro in Excel/VBA that goes through a number of columns of the active worksheet to sum up their widths. This goes like "ActiveSheet.Columns(n).Width".
Can someone please tell me how I can access this array in MSVC++ with OLE/COM? I have found wrapper classes for almost any Collection object, like Shape and Shapes, Window and Windows aso. But no Column nor Columns.
I can query the Columns of a worksheet with "Worksheet::GetColumns()", but this returns a DISPATCH thing I don't know what object type to assign to.
Anyone?
I have written a small macro in Excel/VBA that goes through a number of columns of the active worksheet to sum up their widths. This goes like "ActiveSheet.Columns(n).Width".
Can someone please tell me how I can access this array in MSVC++ with OLE/COM? I have found wrapper classes for almost any Collection object, like Shape and Shapes, Window and Windows aso. But no Column nor Columns.
I can query the Columns of a worksheet with "Worksheet::GetColumns()", but this returns a DISPATCH thing I don't know what object type to assign to.
Anyone?