-1

I am trying to check, if the name of the sheet already is in the other workbook. I am currently trying it like this:

if (tempWb.Worksheets.Names.Contains(ibbWs.Worksheets[index].Name))
{
...
}

How can I fix that or convert a string into a Aspose.Cells.Name object?

probst
  • 196
  • 1
  • 1
  • 12

1 Answers1

1

You may simply check whether a given Name is null or not, so you may write your own code accordingly for your needs. See the sample code segment for your reference: e.g

Sample code:

------------
Name name = workbook.Worksheets.Names["yournamestring"];
if (name == null)
                    Debug.WriteLine("Not found");
                else
                    Debug.WriteLine("found" );
                    //...........Your code goes here.
  -------

PS. I am working as Support developer/ Evangelist at Aspose.

Amjad Sahi
  • 1,813
  • 1
  • 10
  • 15