أوجد القيمة في 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 من أي من مواقع الترميز الاجتماعي المذكورة أدناه: