Cells で値を検索

Aspose.Cells - Cells の値を検索

Microsoft Excel では、ユーザーは特定のデータを含むセルを検索できます。たとえば、編集その後探す検索ダイアログを開きます。ユーザーが値を入力してクリックわかったそれを検索します。 Excel で一致するフィールドが強調表示されます。

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);

実行中のコードをダウンロード

ダウンロードCells で値を検索以下のソーシャル コーディング サイトのいずれかを形成します。