Interface IXLWorksheet
public interface IXLWorksheet : IXLRangeBase, IXLAddressable, IXLProtectable<IXLSheetProtection, XLSheetProtectionElements>, IXLProtectable, IXLSheet
- Inherited Members
- Extension Methods
Properties
ActiveCell
IXLCell ActiveCell { get; set; }
Property Value
Author
string Author { get; set; }
Property Value
AutoFilter
IXLAutoFilter AutoFilter { get; }
Property Value
ColumnWidth
Gets or sets the default column width for this worksheet.
double ColumnWidth { get; set; }
Property Value
ConditionalFormats
IXLConditionalFormats ConditionalFormats { get; }
Property Value
DataValidations
IXLDataValidations DataValidations { get; }
Property Value
MergedRanges
IXLRanges MergedRanges { get; }
Property Value
NamedRanges
Gets an object to manage this worksheet's named ranges.
IXLNamedRanges NamedRanges { get; }
Property Value
Outline
Gets an object to manipulate the Outline levels.
IXLOutline Outline { get; }
Property Value
PageSetup
Gets an object to manipulate the sheet's print options.
IXLPageSetup PageSetup { get; }
Property Value
PivotTables
IXLPivotTables PivotTables { get; }
Property Value
RightToLeft
bool RightToLeft { get; set; }
Property Value
RowHeight
Gets or sets the default row height for this worksheet.
double RowHeight { get; set; }
Property Value
SelectedRanges
IXLRanges SelectedRanges { get; }
Property Value
SheetView
Gets an object to manage how the sheet is going to be displayed by Excel.
IXLSheetView SheetView { get; }
Property Value
ShowFormulas
bool ShowFormulas { get; set; }
Property Value
ShowGridLines
bool ShowGridLines { get; set; }
Property Value
ShowOutlineSymbols
bool ShowOutlineSymbols { get; set; }
Property Value
ShowRowColHeaders
bool ShowRowColHeaders { get; set; }
Property Value
ShowRuler
bool ShowRuler { get; set; }
Property Value
ShowWhiteSpace
bool ShowWhiteSpace { get; set; }
Property Value
ShowZeros
bool ShowZeros { get; set; }
Property Value
SortColumns
IXLSortElements SortColumns { get; }
Property Value
SortRows
IXLSortElements SortRows { get; }
Property Value
SparklineGroups
IXLSparklineGroups SparklineGroups { get; }
Property Value
TabColor
XLColor TabColor { get; set; }
Property Value
Tables
Gets an object to manage this worksheet's Excel tables
IXLTables Tables { get; }
Property Value
Methods
Cell(IXLAddress)
Gets the cell at the specified address.
IXLCell Cell(IXLAddress cellAddressInRange)
Parameters
cellAddressInRangeIXLAddressThe cell address in the worksheet.
Returns
Cell(int, int)
Gets the cell at the specified row and column.
IXLCell Cell(int row, int column)
Parameters
Returns
Cell(int, string)
Gets the cell at the specified row and column.
IXLCell Cell(int row, string column)
Parameters
Returns
Cell(string)
Gets the cell at the specified address.
IXLCell Cell(string cellAddressInRange)
Parameters
cellAddressInRangestringThe cell address in the worksheet.
Returns
CollapseColumns()
Collapses all outlined columns.
IXLWorksheet CollapseColumns()
Returns
CollapseColumns(int)
Collapses the outlined columns of the specified level.
IXLWorksheet CollapseColumns(int outlineLevel)
Parameters
outlineLevelintThe outline level.
Returns
CollapseRows()
Collapses all outlined rows.
IXLWorksheet CollapseRows()
Returns
CollapseRows(int)
Collapses the outlined rows of the specified level.
IXLWorksheet CollapseRows(int outlineLevel)
Parameters
outlineLevelintThe outline level.
Returns
Column(int)
Gets the specified column of the worksheet.
IXLColumn Column(int column)
Parameters
columnintThe worksheet's column.
Returns
Column(string)
Gets the specified column of the worksheet.
IXLColumn Column(string column)
Parameters
columnstringThe worksheet's column.
Returns
ColumnCount()
Gets the number of columns in this worksheet.
int ColumnCount()
Returns
Columns()
Gets a collection of all columns in this worksheet.
IXLColumns Columns()
Returns
Columns(int, int)
Gets a collection of the specified columns in this worksheet.
IXLColumns Columns(int firstColumn, int lastColumn)
Parameters
Returns
Columns(string)
Gets a collection of the specified columns in this worksheet, separated by commas.
e.g. Columns("G:H"), Columns("10:11,13:14"), Columns("P:Q,S:T"), Columns("V")
IXLColumns Columns(string columns)
Parameters
columnsstringThe columns to return.
Returns
Columns(string, string)
Gets a collection of the specified columns in this worksheet.
IXLColumns Columns(string firstColumn, string lastColumn)
Parameters
Returns
ColumnsUsed(XLCellsUsedOptions, Func<IXLColumn, bool>)
IXLColumns ColumnsUsed(XLCellsUsedOptions options = XLCellsUsedOptions.AllContents, Func<IXLColumn, bool> predicate = null)
Parameters
optionsXLCellsUsedOptionspredicateFunc<IXLColumn, bool>
Returns
ColumnsUsed(Func<IXLColumn, bool>)
IXLColumns ColumnsUsed(Func<IXLColumn, bool> predicate)
Parameters
Returns
CopyTo(XLWorkbook)
IXLWorksheet CopyTo(XLWorkbook workbook)
Parameters
workbookXLWorkbook
Returns
CopyTo(XLWorkbook, string)
Copy a worksheet from this workbook to a different workbook as a new sheet.
IXLWorksheet CopyTo(XLWorkbook workbook, string newSheetName)
Parameters
workbookXLWorkbookWorkbook into which copy this sheet.
newSheetNamestringName of new sheet in the
workbookwhere will the data be copied. Sheet will be in the last position.
Returns
- IXLWorksheet
Newly created sheet in the
workbook.
CopyTo(XLWorkbook, string, int)
IXLWorksheet CopyTo(XLWorkbook workbook, string newSheetName, int position)
Parameters
workbookXLWorkbooknewSheetNamestringpositionint
Returns
CopyTo(string)
Copies the
IXLWorksheet CopyTo(string newSheetName)
Parameters
newSheetNamestring
Returns
CopyTo(string, int)
IXLWorksheet CopyTo(string newSheetName, int position)
Parameters
Returns
Evaluate(string, string)
Evaluate an formula and return a result.
XLCellValue Evaluate(string expression, string formulaAddress = null)
Parameters
expressionstringFormula to evaluate.
formulaAddressstringA cell address that is used to provide context for formula calculation (mostly implicit intersection).
Returns
Exceptions
- MissingContextException
If
formulaAddresswas needed for some part of calculation.
ExpandColumns()
Expands all outlined columns.
IXLWorksheet ExpandColumns()
Returns
ExpandColumns(int)
Expands the outlined columns of the specified level.
IXLWorksheet ExpandColumns(int outlineLevel)
Parameters
outlineLevelintThe outline level.
Returns
ExpandRows()
Expands all outlined rows.
IXLWorksheet ExpandRows()
Returns
ExpandRows(int)
Expands the outlined rows of the specified level.
IXLWorksheet ExpandRows(int outlineLevel)
Parameters
outlineLevelintThe outline level.
Returns
FirstColumn()
Gets the first column of the worksheet.
IXLColumn FirstColumn()
Returns
FirstColumnUsed()
Gets the first non-empty column of the worksheet that contains a cell with a value.
IXLColumn FirstColumnUsed()
Returns
FirstColumnUsed(XLCellsUsedOptions)
Gets the first non-empty column of the worksheet that contains a cell with a value.
IXLColumn FirstColumnUsed(XLCellsUsedOptions options)
Parameters
optionsXLCellsUsedOptionsThe options to determine whether a cell is used.
Returns
FirstRow()
Gets the first row of the worksheet.
IXLRow FirstRow()
Returns
FirstRowUsed()
Gets the first non-empty row of the worksheet that contains a cell with a value.
Formatted empty cells do not count.
IXLRow FirstRowUsed()
Returns
FirstRowUsed(XLCellsUsedOptions)
Gets the first non-empty row of the worksheet that contains a cell with a value.
IXLRow FirstRowUsed(XLCellsUsedOptions options)
Parameters
optionsXLCellsUsedOptionsThe options to determine whether a cell is used.
Returns
Hide()
IXLWorksheet Hide()
Returns
LastColumn()
Gets the last column of the worksheet.
IXLColumn LastColumn()
Returns
LastColumnUsed()
Gets the last non-empty column of the worksheet that contains a cell with a value.
IXLColumn LastColumnUsed()
Returns
LastColumnUsed(XLCellsUsedOptions)
Gets the last non-empty column of the worksheet that contains a cell with a value.
IXLColumn LastColumnUsed(XLCellsUsedOptions options)
Parameters
optionsXLCellsUsedOptionsThe options to determine whether a cell is used.
Returns
LastRow()
Gets the last row of the worksheet.
IXLRow LastRow()
Returns
LastRowUsed()
Gets the last non-empty row of the worksheet that contains a cell with a value.
IXLRow LastRowUsed()
Returns
LastRowUsed(XLCellsUsedOptions)
Gets the last non-empty row of the worksheet that contains a cell with a value.
IXLRow LastRowUsed(XLCellsUsedOptions options)
Parameters
optionsXLCellsUsedOptionsThe options to determine whether a cell is used.
Returns
NamedRange(string)
Gets the specified named range.
IXLNamedRange NamedRange(string rangeName)
Parameters
rangeNamestringName of the range.
Returns
PivotTable(string)
IXLPivotTable PivotTable(string name)
Parameters
namestring
Returns
Range(IXLAddress, IXLAddress)
Returns the specified range.
IXLRange Range(IXLAddress firstCellAddress, IXLAddress lastCellAddress)
Parameters
firstCellAddressIXLAddressThe first cell address in the worksheet.
lastCellAddressIXLAddressThe last cell address in the worksheet.
Returns
Range(IXLCell, IXLCell)
Returns the specified range.
IXLRange Range(IXLCell firstCell, IXLCell lastCell)
Parameters
Returns
Range(IXLRangeAddress)
Returns the specified range.
IXLRange Range(IXLRangeAddress rangeAddress)
Parameters
rangeAddressIXLRangeAddressThe range boundaries.
Returns
Range(int, int, int, int)
Returns the specified range.
IXLRange Range(int firstCellRow, int firstCellColumn, int lastCellRow, int lastCellColumn)
Parameters
firstCellRowintThe first cell's row of the range to return.
firstCellColumnintThe first cell's column of the range to return.
lastCellRowintThe last cell's row of the range to return.
lastCellColumnintThe last cell's column of the range to return.
Returns
- IXLRange
.
Range(string)
Returns the specified range.
IXLRange Range(string rangeAddress)
Parameters
rangeAddressstringThe range boundaries.
Returns
Range(string, string)
Returns the specified range.
IXLRange Range(string firstCellAddress, string lastCellAddress)
Parameters
firstCellAddressstringThe first cell address in the worksheet.
lastCellAddressstringThe last cell address in the worksheet.
Returns
RangeUsed()
IXLRange RangeUsed()
Returns
RangeUsed(XLCellsUsedOptions)
IXLRange RangeUsed(XLCellsUsedOptions options)
Parameters
optionsXLCellsUsedOptions
Returns
Ranges(string)
Returns a collection of ranges, separated by commas.
IXLRanges Ranges(string ranges)
Parameters
rangesstringThe ranges to return.
Returns
RecalculateAllFormulas()
Force recalculation of all cell formulas.
void RecalculateAllFormulas()
Row(int)
Gets the specified row of the worksheet.
IXLRow Row(int row)
Parameters
rowintThe worksheet's row.
Returns
RowCount()
Gets the number of rows in this worksheet.
int RowCount()
Returns
Rows()
Gets a collection of all rows in this worksheet.
IXLRows Rows()
Returns
Rows(int, int)
Gets a collection of the specified rows in this worksheet.
IXLRows Rows(int firstRow, int lastRow)
Parameters
Returns
Rows(string)
Gets a collection of the specified rows in this worksheet, separated by commas.
e.g. Rows("4:5"), Rows("7:8,10:11"), Rows("13")
IXLRows Rows(string rows)
Parameters
rowsstringThe rows to return.
Returns
RowsUsed(XLCellsUsedOptions, Func<IXLRow, bool>)
IXLRows RowsUsed(XLCellsUsedOptions options = XLCellsUsedOptions.AllContents, Func<IXLRow, bool> predicate = null)
Parameters
optionsXLCellsUsedOptionspredicateFunc<IXLRow, bool>
Returns
RowsUsed(Func<IXLRow, bool>)
IXLRows RowsUsed(Func<IXLRow, bool> predicate)
Parameters
Returns
SetRightToLeft()
IXLWorksheet SetRightToLeft()
Returns
SetRightToLeft(bool)
IXLWorksheet SetRightToLeft(bool value)
Parameters
valuebool
Returns
SetShowFormulas()
IXLWorksheet SetShowFormulas()
Returns
SetShowFormulas(bool)
IXLWorksheet SetShowFormulas(bool value)
Parameters
valuebool
Returns
SetShowGridLines()
IXLWorksheet SetShowGridLines()
Returns
SetShowGridLines(bool)
IXLWorksheet SetShowGridLines(bool value)
Parameters
valuebool
Returns
SetShowOutlineSymbols()
IXLWorksheet SetShowOutlineSymbols()
Returns
SetShowOutlineSymbols(bool)
IXLWorksheet SetShowOutlineSymbols(bool value)
Parameters
valuebool
Returns
SetShowRowColHeaders()
IXLWorksheet SetShowRowColHeaders()
Returns
SetShowRowColHeaders(bool)
IXLWorksheet SetShowRowColHeaders(bool value)
Parameters
valuebool
Returns
SetShowRuler()
IXLWorksheet SetShowRuler()
Returns
SetShowRuler(bool)
IXLWorksheet SetShowRuler(bool value)
Parameters
valuebool
Returns
SetShowWhiteSpace()
IXLWorksheet SetShowWhiteSpace()
Returns
SetShowWhiteSpace(bool)
IXLWorksheet SetShowWhiteSpace(bool value)
Parameters
valuebool
Returns
SetShowZeros()
IXLWorksheet SetShowZeros()
Returns
SetShowZeros(bool)
IXLWorksheet SetShowZeros(bool value)
Parameters
valuebool
Returns
SetTabActive()
IXLWorksheet SetTabActive()
Returns
SetTabActive(bool)
IXLWorksheet SetTabActive(bool value)
Parameters
valuebool
Returns
SetTabColor(XLColor)
IXLWorksheet SetTabColor(XLColor color)
Parameters
colorXLColor
Returns
SetTabSelected()
IXLWorksheet SetTabSelected()
Returns
SetTabSelected(bool)
IXLWorksheet SetTabSelected(bool value)
Parameters
valuebool
Returns
Sort()
IXLRange Sort()
Returns
Sort(int, XLSortOrder, bool, bool)
IXLRange Sort(int columnToSortBy, XLSortOrder sortOrder = XLSortOrder.Ascending, bool matchCase = false, bool ignoreBlanks = true)
Parameters
columnToSortByintsortOrderXLSortOrdermatchCaseboolignoreBlanksbool
Returns
Sort(string, XLSortOrder, bool, bool)
IXLRange Sort(string columnsToSortBy, XLSortOrder sortOrder = XLSortOrder.Ascending, bool matchCase = false, bool ignoreBlanks = true)
Parameters
columnsToSortBystringsortOrderXLSortOrdermatchCaseboolignoreBlanksbool
Returns
SortLeftToRight(XLSortOrder, bool, bool)
IXLRange SortLeftToRight(XLSortOrder sortOrder = XLSortOrder.Ascending, bool matchCase = false, bool ignoreBlanks = true)
Parameters
sortOrderXLSortOrdermatchCaseboolignoreBlanksbool
Returns
Table(int)
Gets the Excel table of the given index
IXLTable Table(int index)
Parameters
indexintIndex of the table to return
Returns
Table(string)
Gets the Excel table of the given name
IXLTable Table(string name)
Parameters
namestringName of the table to return
Returns
Unhide()
IXLWorksheet Unhide()