Class AbstractCalculationMonitor
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
ניטור עבור המשתמש כדי לעקוב אחר התקדמות חישוב הנוסחאות.
public abstract class AbstractCalculationMonitor
ירושה
object ← AbstractCalculationMonitor
חברים המורשים
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
דוגמאות
Workbook wb = new Workbook("calc.xlsx");
CalculationOptions opts = new CalculationOptions();
opts.CalculationMonitor = new MyCalculationMonitor();
wb.CalculateFormula(opts);
class MyCalculationMonitor : AbstractCalculationMonitor
{
public override void BeforeCalculate(int sheetIndex, int rowIndex, int colIndex)
{
if(sheetIndex!=0 || rowIndex!=0 || colIndex!=0)
{
return;
}
Console.WriteLine("התא A1 יחושב.");
}
}
בונים
AbstractCalculationMonitor()
protected AbstractCalculationMonitor()
מאפיינים
CalculatedValue
מחזיר את הערך החדש שחושב של התא. יש להשתמש בו רק ב-Aspose.Cells.AbstractCalculationMonitor.AfterCalculate(System.Int32,System.Int32,System.Int32).
public object CalculatedValue { get; }
ערך המאפיין
OriginalValue
מחזיר את הערך הישן של התא שחושב. יש להשתמש בו רק ב-Aspose.Cells.AbstractCalculationMonitor.BeforeCalculate(System.Int32,System.Int32,System.Int32) וב-Aspose.Cells.AbstractCalculationMonitor.AfterCalculate(System.Int32,System.Int32,System.Int32).
public object OriginalValue { get; }
ערך המאפיין
ValueChanged
אם ערך התא שונה לאחר החישוב. יש להשתמש בו רק ב-Aspose.Cells.AbstractCalculationMonitor.AfterCalculate(System.Int32,System.Int32,System.Int32).
public bool ValueChanged { get; }
ערך המאפיין
שיטות
AfterCalculate(int, int, int)
מממש שיטה זו כדי לבצע פעולות לאחר שחושב תא אחד.
public virtual void AfterCalculate(int sheetIndex, int rowIndex, int colIndex)
פרמטרים
sheetIndex
int
אינדקס הגיליון שאליו שייך התא.
rowIndex
int
אינדקס השורה של התא
colIndex
int
אינדקס העמודה של התא
BeforeCalculate(int, int, int)
מממש שיטה זו כדי לבצע פעולות לפני חישוב תא אחד.
public virtual void BeforeCalculate(int sheetIndex, int rowIndex, int colIndex)
פרמטרים
sheetIndex
int
אינדקס הגיליון שאליו שייך התא.
rowIndex
int
אינדקס השורה של התא
colIndex
int
אינדקס העמודה של התא
Interrupt(string)
protected void Interrupt(string msg)
פרמטרים
msg
string
OnCircular(IEnumerator)
מממש שיטה זו כדי לבצע פעולות כאשר מחשבים נוסחאות עם הפניות מעגליות.
public virtual bool OnCircular(IEnumerator circularCellsData)
פרמטרים
circularCellsData
IEnumerator
IEnumerator עם פריטי Aspose.Cells.CalculationCell המייצגים תאים שתלויים בהפניות מעגליות.
מחזיר
אם מנוע הנוסחאות צריך לחשב את התאים הללו בעגלות לאחר קריאה זו. True כדי לאפשר למנוע הנוסחאות להמשיך לחשב עבורם. False כדי לאפשר למנוע הנוסחאות פשוט לסמן את התאים הללו כחושבים.
הערות
במימוש המשתמש עשוי גם להגדיר את הערך הצפוי כתוצאה שחושבה עבור חלק/כל התאים הללו כך שמנוע הנוסחאות לא יחשב אותם באופן רקורסיבי.