Class ExcelWorkbook¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Represents the Excel workbook and provides access to all the document properties and worksheets within the workbook.
Inheritance¶
object ← XmlHelper ← ExcelWorkbook
Implements¶
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object?, object?)
object.ToString()
Extension Methods¶
CalculationExtension.Calculate(ExcelWorkbook, Action<ExcelCalculationOption>)
CalculationExtension.Calculate(ExcelWorkbook, ExcelCalculationOption)
CalculationExtension.Calculate(ExcelWorkbook)
Properties¶
CalcMode¶
Calculation mode for the workbook.
Property Value¶
CodeModule¶
The VBA code module if the package has a VBA project. Otherwise this propery is null. CreateVBAProject
Property Value¶
Date1904¶
The date systems used by Microsoft Excel can be based on one of two different dates. By default, a serial number of 1 in Microsoft Excel represents January 1, 1900. The default for the serial number 1 can be changed to represent January 2, 1904. This option was included in Microsoft Excel for Windows to make it compatible with Excel for the Macintosh, which defaults to January 2, 1904.
Property Value¶
DefaultThemeVersion¶
The default version of themes to apply in the workbook
Property Value¶
int?
DigitalSignatures¶
A collection of digital signatures for the workbook
Property Value¶
ExcelDigitalSignatureCollection
ExternalLinks¶
A collection of links to external workbooks and it's cached data. This collection can also contain DDE and OLE links. DDE and OLE are readonly and cannot be added.
Property Value¶
FormulaParserManager¶
Manage the formula parser. Add your own functions or replace native ones, parse formulas or attach a logger.
Property Value¶
FullCalcOnLoad¶
Should Excel do a full calculation after the workbook has been loaded?
Property Value¶
FullPrecision¶
If false, EPPlus will round cell values to the number of decimals as displayed in the cell by using the cells number format when calculating the workbook. If true, full precision will be used on calculation.
Property Value¶
HasLoadedPivotTables¶
Returns true if the workbook has pivot tables in any worksheet.
Property Value¶
MaxFontWidth¶
Max font width for the workbook, used in the calculation of column widths.
Property Value¶
Names¶
Provides access to named ranges
Property Value¶
NumberFormatToTextHandler¶
Handler for the Text property to override the default behaviour. This can be used to handle localized number formats or formats where EPPlus differs from the spread sheet application.
Property Value¶
Func<NumberFormatToTextArgs, string>
Properties¶
The office document properties
Property Value¶
Protection¶
Access properties to protect or unprotect a workbook
Property Value¶
Styles¶
Package styles collection. Used internally to access style data.
Property Value¶
StylesXml¶
Provides access to the XML data representing the styles in the package.
Property Value¶
XmlDocument
ThemeManager¶
Create and manage the theme for the workbook.
Property Value¶
ThreadedCommentPersons¶
Represents a collection of ExcelThreadedCommentPersons in the workbook.
Property Value¶
ExcelThreadedCommentPersonCollection
VbaProject¶
A reference to the VBA project. Null if no project exists. Use Workbook.CreateVBAProject to create a new VBA-Project
Property Value¶
View¶
Access to workbook view properties
Property Value¶
WorkbookXml¶
Provides access to the XML data representing the workbook in the package.
Property Value¶
XmlDocument
Worksheets¶
Provides access to all the worksheets in the workbook. Note: Worksheets index either starts by 0 or 1 depending on the Excelpackage.Compatibility.IsWorksheets1Based property. Default is 1 for .Net 3.5 and .Net 4 and 0 for .Net Core.
Property Value¶
Methods¶
CalculateAllPivotTables(bool)¶
Calculate all pivot tables in the workbook. Also see Calculate(bool) and Calculate(bool)
Parameters¶
refresh bool
If the cache should be refreshed.
ClearFormulaValues()¶
Removes all values of cells with formulas in the entire workbook, but keeps the formulas.
ClearFormulas()¶
Removes all formulas within the entire workbook, but keeps the calculated values.
CreateHtmlExporter(params ExcelRangeBase[])¶
Create an html exporter for the supplied ranges.
Parameters¶
ranges ExcelRangeBase[]
The ranges to create the report from. All ranges must originate from the current workbook.
Returns¶
The HTML exporter.
Exceptions¶
CreateVBAProject()¶
Create an empty VBA project.
Dispose()¶
Disposes the workbooks
RemoveVBAProject()¶
Remove the from the file VBA project.