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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Determine whether a Range exists

Thread ID:





56666 Feb 19,2007 07:48 AM UTC Jun 24,2008 08:45 AM UTC ASP.NET Web Forms (Classic) 5
Tags: XlsIO
Nipun Tamrakar
Asked On February 19, 2007 07:48 AM UTC

How do i determine whether a range with specific name exists or not.

Eg. if sheet.Range("myRange").exists then

Thank you

Melba Winshia [Syncfusion]
Replied On February 19, 2007 01:31 PM UTC

Hi Nipun,

You can use the following code snippet to determine whether a range with specific name exists or not.


// Naming a Range

//determine whether a range with specific name exists or not
sheet1.Range["One"].Text="Hello World!";

Here is the sample for your reference:


Kindly take a look at the sample above and let me know if you have any other questions.


Nipun Tamrakar
Replied On February 21, 2007 09:31 AM UTC

Hello Melba
Thank you very much. It helped a lot

Melba Winshia [Syncfusion]
Replied On February 21, 2007 02:05 PM UTC

Hi Nipun,

Thanks for the update!


Amal Ibrahim
Replied On June 23, 2008 06:10 PM UTC

Can I do that without using the add method first?
My excel will have named range already and I don't wat to add them by code, I just want to loop through them to find specific name for example.
BTW, I am use version.
Thanks for your help

Yavanaarasi G [Syncfusion]
Replied On June 24, 2008 08:45 AM UTC

Hi Amal,

You have created the direct trac incident regarding this issue.

Please follow up the incident [#47333].



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon