Finden Sie Wert in Cells

Aspose.Cells - Wert finden in Cells

In Microsoft Excel können Benutzer nach Zellen suchen, die bestimmte Daten enthalten. Klicken zum BeispielBearbeitenund dannFindenöffnet den Suchdialog. Der Benutzer gibt einen Wert ein und klicktOKdanach zu suchen. Excel hebt übereinstimmende Felder hervor.

C#

 //Instantiating a Workbook object

Workbook workbook = new Workbook("../../data/test.xlsx");

//Accessing the first worksheet in the Excel file

Worksheet worksheet = workbook.Worksheets[0];

//Finding the cell containing the specified formula

Cells cells = worksheet.Cells;

//Instantiate FindOptions

FindOptions findOptions = new FindOptions();

//Finding the cell containing a string value that starts with "Or"

findOptions.LookAtType = LookAtType.StartWith;

Cell cell = cells.Find("SH", null, findOptions);

//Printing the name of the cell found after searching worksheet

Console.WriteLine("Name of the cell containing String: " + cell.Name);

Laufcode herunterladen

DownloadFinden Sie Wert in Cells Bilden Sie eine der unten genannten Social-Coding-Sites: