xlsx4j de Hücrelerde Değer Bulma

Aspose.Cells - Hücrelerde Değer Bul

Microsoft Excel’de kullanıcılar belirli veriler içeren hücreleri arayabilir. Örneğin, Düzenle‘ye tıkladıktan sonra Bul açılır iletişim kutusunu açarlar. Kullanıcılar bir değer girer ve aramak için Tamam‘a tıklarlar. Excel eşleşen alanları vurgular.

Java

 //Instantiating a Workbook object

Workbook workbook = new Workbook("workbook.xls");

//Accessing the first worksheet in the Excel file

Worksheet worksheet = workbook.getWorksheets().get(0);

//Finding the cell containing the specified formula

Cells cells = worksheet.getCells();

//Instantiate FindOptions

FindOptions findOptions = new FindOptions();

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

findOptions.setLookAtType(LookAtType.START_WITH);

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

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

System.out.println("Name of the cell containing String: " + cell.getName());

Çalışan Kodu İndir

Örnek Kod İndir