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

Problem with named cells

Thread ID:





95702 Jul 26,2010 04:12 PM UTC Jul 28,2010 05:56 AM UTC ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Benoit Lecue
Asked On July 26, 2010 04:12 PM UTC


I’d like to have two informations !
Actually, I have created in my excel file (in Excel not by using syncfusion) a defined name cell call “test”. The only way to get the text in this one is with the method “Range["test"].Text” and not thanks to the method : sheet.Names("CellName").Value. Is it normal ?
And secondly, I’d like to know if it’s possible to check if an defined named cell exist without crashing. Indeed, if the cell doesn’t exist in the Excel file, I’d like to know that by making a test. For the moment, I have always an exception and I don’t want to use a “try/catch”.

Thanks a lot!

Lokesh R [Syncfusion]
Replied On July 28, 2010 05:56 AM UTC

Hi Benoit,

Thank you very much for your interest on Syncfusion products.

I have analyzed the two queries posted in your last update and given below the details in separate headings.


The Value property associated with the INames will return only the A-1 style notation of the referred range which we represent in the macros without a "=" sign. If you have to retrieve a value of the named range you need to use the below code snippet instead of the above.


Named cell exist without crashing:

you can read all the named cells by iterating the INames collections. I have given below the code snippet for the same.

foreach (IName namedCell in wkBook.Names)
if (namedCell.Name == "Test")


For Each namedCell As IName In wkBook.Names
If namedCell.Name = "Test" Then
End If
Next namedCell

Please, let us know if you need any clarifications.



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

or the page will be automatically redirected to 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