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.

Identifying the merged cell in the specified range

Thread ID:

Created:

Updated:

Platform:

Replies:

37616 Nov 28,2005 06:27 AM Nov 29,2005 06:39 AM Windows Forms 2
loading
Tags: XlsIO
Prathima Venkobachar
Asked On November 28, 2005 06:27 AM

Hi, I want to validate Excel file, if the excel sheet has Merger cells(This I can do by taking Merged cell count) I want to validate, if there are any merged cells in the Specified Range..like from 3rd column to 5th column. How can I do this..? Thanks and Regards, Prathima

Administrator [Syncfusion]
Replied On November 29, 2005 12:45 AM

Hi Prathima, I have logged a feature request for this issue Feature id:#583. It will be available in the next release. The next release is in the first week of december. Thanks for your interest with Syncfusion Products. Best Regards, Seetha >Hi, > >I want to validate Excel file, if the excel sheet has Merger cells(This I can do by taking Merged cell count) >I want to validate, if there are any merged cells in the Specified Range..like from 3rd column to 5th column. >How can I do this..? > >Thanks and Regards, >Prathima

Administrator [Syncfusion]
Replied On November 29, 2005 06:39 AM

Hi Prathima, Here is some sample code that retrieves the merged cells in a given Range //First Approach //Get Merged cells in a given Range [This range covers all used cells in columns //3 to 5) foreach(IRange range in sheet.Range[1,3,sheet.UsedRange.End.Row,5].Cells) { if(range.IsMerged) { range.Text = range.Address; } } //Second Approach foreach(IRange range in sheet.MergedCells) { if(range.Column >= 3 && range.Column <= 5) { range.Text = range.Address; } } Here is a sample F37616.zip Please let me know if you have any questions. Thanks, Stephen.

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.

;