Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Excel Automation, Repopulating an Excel Template

12 views
Skip to first unread message

new.coder

unread,
Feb 2, 2010, 4:58:01 AM2/2/10
to
hi!
here's the code:

// Get Range
CRange rangeToCopy = m_xlWorksheet.get_Range(COleVariant(CellAddress(1, 1)),
COleVariant(CellAddress(1, 1)));// CellAddress() convert row and col to RC

// Get Merge Cols
CAreas areaRange = rangeToCopy.get_MergeArea();
int nMergeCols = areaRange.get_Count();

-----------------------------------------------------------
if cell A1 is merged w/ cell B1
i get nMergeCols = 2 which is correct
the code detected that cell A1 is merged w/ B1

my problem is, if rows are merged, i dont know
how to get the number of merged rows.

please help...


0 new messages