We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to get excel merge count.

Thread ID:

Created:

Updated:

Platform:

Replies:

19608 Sep 30,2004 03:35 AM Oct 1,2004 10:02 PM Windows Forms 3
loading
Tags: XlsIO
Vu Dang Quang
Asked On September 30, 2004 03:35 AM

In my excel sheet. I''ve merge A1:A9. When I using ExcelRW read Range[A1]. How do I knrow colspan. Anybody know can tell me.

Greg
Replied On September 30, 2004 08:23 AM

Personally, I scan through the merged section before accessing individual cells. You might put this info in a collection to test against when you read each cell. Maybe SyncFusion has a better recommendation. foreach (IRange ecell in wk.MergedCells) { top = ecell.Row; left = ecell.Column; bottom = top + ecell.Rows.Length - 1; right = left + ecell.Columns.Length - 1; }

Administrator [Syncfusion]
Replied On September 30, 2004 09:25 AM

Hi, Thanks for your input Greg. We have added a new property IRange.MergeArea which will return a Range that encapsulates the Merged cells. Unfortunately we do not have an updated evaluation version available right now, so please open a Direc-Trac incident in this regard and I will try to provide you with an updated evaluation version as soon as possible. Thanks. Best regards, Stephen. >Personally, I scan through the merged section before accessing individual cells. You might put this info in a collection to test against when you read each cell. Maybe SyncFusion has a better recommendation. > > foreach (IRange ecell in wk.MergedCells) > { > > top = ecell.Row; > left = ecell.Column; > bottom = top + ecell.Rows.Length - 1; > right = left + ecell.Columns.Length - 1; >}

Vu Dang Quang
Replied On October 1, 2004 10:02 PM

Thanks for Greg. I''ve try using it code and it works good. vdquang >Personally, I scan through the merged section before accessing individual cells. You might put this info in a collection to test against when you read each cell. Maybe SyncFusion has a better recommendation. > > foreach (IRange ecell in wk.MergedCells) > { > > top = ecell.Row; > left = ecell.Column; > bottom = top + ecell.Rows.Length - 1; > right = left + ecell.Columns.Length - 1; >}

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;