I use the Cells.Find Method. I want to match the whole text of cells, that is, I don’t want to find the cells that match the partial text. How can I set it?
Please try to set LookAtType attribute to “LookAtType.EntireContent” when instantiating FindOptions. See the sample code for your reference:
e.g.
Sample code:
Workbook workbook = new Workbook("Book1.xlsx");
var options = new FindOptions();
options.LookInType = LookInType.OriginalValues;
options.LookAtType = LookAtType.EntireContent;
options.CaseSensitive = true;
var cell = workbook.Worksheets[0].Cells.Find("Destination", null, options);
Console.WriteLine(cell.Name);
.........
Moreover, see the document for your further reference on Find or Search Options.
this is very good! thanks
Good to know that the suggested code segment figures out your issue now. In the event of further queries or issue, feel free to write us back.