Can't get excel Ranges to work using (Visual) C++

H

hernan.rancati

Hi people,

I am stuck trying to access a cell range in excel, almost everything I
try over
the range fails.

my code looks like:

CRange range(m_sheet.get_Range(COleVariant(CString("A2")),
COleVariant(CString("B4")) ));

after this, any of the following lines fail during the call:

CRange arow=range.get_EntireRow();
CRange acol=range.get_EntireColumn();
long a==range.get_Count();
long b=range.get_height();

but, if I try to access any cell using getRange for a single cell, I
can get the value with get_Value2() method.

any idea will be great, I am starting to get frustrated with this..

Hernan Rancati (cesare)
 
Top