Class CalculationExtension¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Extentions methods for formula calculation.
Inheritance¶
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Methods¶
Calculate(ExcelWorkbook)¶
Calculate all formulas in the current workbook
Parameters¶
workbook ExcelWorkbook
The workbook
Calculate(ExcelWorkbook, Action<ExcelCalculationOption>)¶
Calculate all formulas in the current workbook
public static void Calculate(this ExcelWorkbook workbook, Action<ExcelCalculationOption> configHandler)
Parameters¶
workbook ExcelWorkbook
The workbook to calculate
configHandler Action<ExcelCalculationOption>
Configuration handler
Examples¶
Calculate(ExcelWorkbook, ExcelCalculationOption)¶
Calculate all formulas in the current workbook
Parameters¶
workbook ExcelWorkbook
The workbook
options ExcelCalculationOption
Calculation options
Calculate(ExcelWorksheet)¶
Calculate all formulas in the current worksheet
Parameters¶
worksheet ExcelWorksheet
The worksheet
Calculate(ExcelWorksheet, Action<ExcelCalculationOption>)¶
Calculate all formulas in the current range
public static void Calculate(this ExcelWorksheet worksheet, Action<ExcelCalculationOption> configHandler)
Parameters¶
worksheet ExcelWorksheet
The worksheet to calculate
configHandler Action<ExcelCalculationOption>
Configuration handler
Examples¶
Calculate(ExcelWorksheet, ExcelCalculationOption)¶
Calculate all formulas in the current worksheet
Parameters¶
worksheet ExcelWorksheet
The worksheet
options ExcelCalculationOption
Calculation options
Calculate(ExcelRangeBase)¶
Calculate all formulas in the current range
Parameters¶
range ExcelRangeBase
The range
Calculate(ExcelRangeBase, Action<ExcelCalculationOption>)¶
Calculate all formulas in the current range
public static void Calculate(this ExcelRangeBase range, Action<ExcelCalculationOption> configHandler)
Parameters¶
range ExcelRangeBase
The range to calculate
configHandler Action<ExcelCalculationOption>
Configuration handler
Examples¶
sheet.Cells["A1:A3"].Calculate(opt => opt.PrecisionAndRoundingStrategy = PrecisionAndRoundingStrategy.Excel);
Calculate(ExcelRangeBase, ExcelCalculationOption)¶
Calculate all formulas in the current range
Parameters¶
range ExcelRangeBase
The range
options ExcelCalculationOption
Calculation options
Calculate(ExcelWorksheet, string)¶
Calculate all formulas in the current range
Parameters¶
worksheet ExcelWorksheet
The worksheet
Formula string
The formula to be calculated
Returns¶
The result of the formula calculation
Calculate(ExcelWorksheet, string, ExcelCalculationOption)¶
Calculate all formulas in the current range
public static object Calculate(this ExcelWorksheet worksheet, string Formula, ExcelCalculationOption options)
Parameters¶
worksheet ExcelWorksheet
The worksheet
Formula string
The formula to be calculated
options ExcelCalculationOption
Calculation options
Returns¶
The result of the formula calculation