Class AbstractFormulaChangeMonitor
Class AbstractFormulaChangeMonitor
Namespace: Aspose.Cells
Assembly: Aspose.Cells.dll (25.2.0)
사용자가 특정 작업 중 수식의 변경을 추적할 수 있도록 모니터링합니다.
public abstract class AbstractFormulaChangeMonitor
상속
object ← AbstractFormulaChangeMonitor
상속된 멤버
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
변경된 셀의 열 인덱스