Class AbstractFormulaChangeMonitor

Class AbstractFormulaChangeMonitor

Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)

راقب المستخدم لتتبع تغيير الصيغ أثناء عمليات معينة.

public abstract class AbstractFormulaChangeMonitor

الوراثة

objectAbstractFormulaChangeMonitor

الأعضاء الموروثة

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

أمثلة

Workbook wb = new Workbook("template.xlsx");
InsertOptions options = new InsertOptions();
options.FormulaChangeMonitor = new MyFormulaChangeMonitor(wb.Worksheets);
wb.Worksheets[0].Cells.InsertRows(0, 2, options);

class MyFormulaChangeMonitor : AbstractFormulaChangeMonitor
{
    private readonly WorksheetCollection mWorksheets;
    public MyFormulaChangeMonitor(WorksheetCollection worksheets)
    {
        mWorksheets = worksheets;
    }
    public override void OnCellFormulaChanged(int sheetIndex, int rowIndex, int columnIndex)
    {
        Console.WriteLine("تم تغيير صيغة الخلية " + mWorksheets[sheetIndex].Name + "!"
            + CellsHelper.CellIndexToName(rowIndex, columnIndex)
            + " أثناء إدراج الصفوف.");
    }
}

ملاحظات

على سبيل المثال، أثناء حذف/إدراج مجموعة من الخلايا، قد تتغير صيغ خلايا أخرى بسبب انتقال المراجع.

المنشئات

AbstractFormulaChangeMonitor()

protected AbstractFormulaChangeMonitor()

الطرق

OnCellFormulaChanged(int, int, int)

الحدث الذي سيتم تفعيله عندما تتغير الصيغة في خلية.

public virtual void OnCellFormulaChanged(int sheetIndex, int rowIndex, int columnIndex)

المعلمات

sheetIndex int

فهرس الورقة للخلية التي تم تغييرها

rowIndex int

فهرس الصف للخلية التي تم تغييرها

columnIndex int

فهرس العمود للخلية التي تم تغييرها

 عربي