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)
 

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