ClosedXML
Base interface for an abstract repository.
Clear the repository;
Put the into the repository under the specified
if there is no such key present.
Key to identify the value.
Value to put into the repository if key does not exist.
Value stored in the repository under the specified . If key already existed
returned value may differ from the input one.
Check if the specified key is presented in the repository.
Key to look for.
Value from the repository stored under specified key or null if key does
not exist or the entry under this key has already bee GCed.
True if entry exists and alive, false otherwise.
Put the entity into the repository under the specified key if no other entity with
the same key is presented.
Key to identify the entity.
Entity to store.
Entity that is stored in the repository under the specified key
(it can be either the or another entity that has been added to
the repository before.)
Enumerate items in repository removing "dead" entries.
Base repository for elements.
A discriminated union representing any value that can be passed around in the formula evaluation.
A value of a blank cell or missing argument. Conversion methods mostly treat blank like 0 or an empty string.
Is the value a scalar (blank, logical, number, text or error).
Try to get a reference that is a one area from the value.
The found area.
Original error, if the value is error, #VALUE! if type is not a reference or #REF! if more than one area in the reference.
True if area could be determined, false otherwise.
Try to get a value more in line with an array formula semantic. The output is always
either single value or an array.
Single cell references are turned into a scalar, multi-area references are turned
into and single-area references are turned
into arrays.
Note the difference in nomenclature: single/multi value vs scalar/collection type.
Implicit intersection for arguments of functions that don't accept range as a parameter (Excel 2016).
Unchanged value for anything other than reference. Reference is changed into a single cell/#VALUE!
Create a new reference that has one area that contains both operands or #VALUE! if not possible.
Create a new reference by combining areas of both arguments. Areas of the new reference can overlap = some overlapping
cells might be counted multiple times (SUM((A1;A1)) = 2 if A1 is 1).
Compare two scalar values using Excel semantic. Rules for comparison are following:
Logical is always greater than any text (thus transitively greater than any number)Text is always greater than any number, even if empty stringLogical are compared by valueNumbers are compared by valueText is compared by through case insensitive comparison for workbook culture.
If any argument is error, return error (general rule for all operators).
If all args are errors, pick leftmost error (technically it is left to
implementation, but excel sems to be using left one)
Left hand operand of the comparison.
Right hand operand of the comparison.
Culture to use for comparison.
Return -1 (negative) if left less than right
Return 1 (positive) if left greater than left
Return 0 if both operands are considered equal.
Get 2d size of the value. For scalars, it's 1x1, for multi-area references,
it's also 1x1,because it is converted to #VALUE! error.
Return the array value.
A base class for an 2D array. Every array is at least 1x1.
Width of the array, at least 1.
Height of the array, at least 1.
Get a value at specified coordinate.
Uses 0-based notation.
Uses 0-based notation.
An iterator over all elements of an array, from top to bottom, from left to right.
Return a new array that was created by applying a function to each element of the array.
Return a new array that was created by applying a function to each element of the left and right array.
Arrays can have different size and missing values are replaced by #N/A.
Rescale array for calculation of array formulas.
An array of scalar values.
A special case of an array that is actually only numbers.
An array that retrieves its value directly from the worksheet without allocating extra memory.
A resize array from another array. Extra items without value have #N/A.
An array where all elements have same value.
Base class for all AST nodes. All AST nodes must be immutable.
Method to accept a visitor (=call a method of visitor with correct type of the node).
A base class for all AST nodes that can be evaluated to produce a value.
AST node that contains a blank, logical, number, text or an error value.
AST node that contains a constant array. Array is at least 1x1.
Unary expression, e.g. +123
Binary expression, e.g. 1+2
A function call, e.g. SIN(0.5).
Name of the function.
An placeholder node for AST nodes that are not yet supported in ClosedXML.
AST node for an reference to an external file in a formula.
If the file is references indirectly, numeric identifier of a file.
If a file is referenced directly, a path to the file on the disc/UNC/web link, .
AST node for prefix of a reference in a formula. Prefix is a specification where to look for a reference.
Prefix specifies a Sheet - used for references in the local workbook.Prefix specifies a FirstSheet and a LastSheet - 3D reference, references uses all sheets between first and last.Prefix specifies a File, no sheet is specified - used for named ranges in external file.Prefix specifies a File and a Sheet - references looks for its address in the sheet of the file.
If prefix references data from another file, can be empty.
Name of the sheet, without ! or escaped quotes. Can be empty in some cases (e.g. reference to a named range in an another file).
If the prefix is for 3D reference, name of first sheet. Empty otherwise.
If the prefix is for 3D reference, name of the last sheet. Empty otherwise.
AST node for a reference of an area in some sheet.
An optional prefix for reference item.
An address of a reference that corresponds to . Always without sheet (that is in the prefix).
A name node in the formula. Name can refers to a generic formula, in most cases a reference, but it can be any kind of calculation (e.g. A1+7).
An optional prefix for reference item.
Can be empty if no prefix available.
Worksheet of the cell the formula is calculating.
Worksheet of the cell the formula is calculating.
Address of the calculated formula.
A culture used for comparisons and conversions (e.g. text to number).
Excel 2016 and earlier doesn't support dynamic array formulas (it used an array formulas instead). As a consequence,
all arguments for scalar functions where passed through implicit intersection before calling the function.
Should functions be calculated per item of multi-values argument in the scalar parameters.
Get cells with a value for a reference.
Reference for which to return cells.
A lazy (non-materialized) enumerable of cells with a value for the reference.
CalcEngine parses strings and returns Expression objects that can
be evaluated.
This class has three extensibility points:Use the RegisterFunction method to define custom functions.
Parses a string into an .
String to parse.
An object that can be evaluated.
Evaluates a normal formula.
Expression to evaluate.
Workbook where is formula being evaluated.
Worksheet where is formula being evaluated.
Address of formula.
The value of the expression.
If you are going to evaluate the same expression several times,
it is more efficient to parse it only once using the
method and then using the Expression.Evaluate method to evaluate
the parsed expression.
Convert any kind of formula value to value returned as a content of a cell.
bool - represents a logical value.double - represents a number and also date/time as serial date-time.string - represents a text value. - represents a formula calculation error.
Delegate that represents CalcEngine functions.
List of objects that represent the
parameters to be used in the function call.
The function result.
Get total count of cells in the specified range without initializing them all
(which might cause serious performance issues on column-wide calculations).
Expression referring to the cell range.
Total number of cells in the range.
Get dimensions of the specified range without initializing them all
(which might cause serious performance issues on column-wide calculations).
Expression referring to the cell range.
A tuple of column and row counts.
A default visitor that copies a formula.
An exception to propagate error from legacy expression function.
Evaluation of the formula needs an information that wasn't available. That can happen if the formula
is evaluated from methods like . Causes vary, e.g. implicit intersection
needs an address of the formula cell. Various methods in ClosedXML are missing different information, e.g.
has worksheet, but no cell address (=ranges will work, other things won't).
An adapter for legacy function implementations.
Expression that represents an external object.
Expression that represents an omitted parameter.
Interface supported by external objects that have to return a value
other than themselves (e.g. a cell range object should return the
cell content instead of the range itself).
Caches expressions based on their string representation.
This saves parsing time.
Uses weak references to avoid accumulating unused expressions.
The exception that is thrown when the strings to be parsed to an expression is invalid.
Initializes a new instance of the ExpressionParseException class with a
specified error message.
The message that describes the error.
A non-state representation of a formula that can be used by many cells.Text of the formula.
Flags that contain some useful information about a formula (mostly derived from flags in functions).
Basic formula that takes an input and returns output that is determined solely by the input. No side effects.
Formula contains a function whose value can be different each time the function is called, even if arguments and workbook are same.
TODAY, RAND
Formula that has a side effects beside returning the value.
HYPERLINK changes the content of a cell in a workbook.
Formula contains a reference to the SUBTOTAL function.
Performance optimization, so a formula with SUBTOTAL doesn't have to check each dependent cell each time it is evaluated.
A parser that takes a string and parses it into concrete syntax tree through XLParser and then
to abstract syntax tree that is used to evaluate the formula.
A prefix is that is used for functions that are present in a version of Excel, but aren't present in older versions.
If you write CONCAT(A1,B1) in Excel 2021 (not present in Excel 2013), it is saved to the worksheet file as
_xlfn.CONCAT(A1,B1), but the Excel GUI will show only CONCAT(A1,B1), without the _xlfn.
Parse a tree into a CSt that also has AST.
Reference AST node is significantly different from CST node. It takes Reference, ReferenceFunctionCall and ReferenceItem terms into a reference value
that represent an area of a workbook (ReferenceNode, StructuredReferenceNode) and operations over these areas (BinaryOperation, UnaryOperation, FunctionExpression).
Parse a fraction for text-to-number type coercion.
Function definition class (keeps function name, parameter counts, and delegate).
Only the or is set.
Only the or is set.
Which parameters of the function are marked. The values are indexes of the function parameters, starting from 0.
Used to determine which arguments allow ranges and which don't.
Evaluate the function with array formula semantic.
Function flags that indicate what does function do. It is used by CalcEngine for calculation
chain and formula execution.
Function that takes an input and returns an output. It is designed for a single value arguments.
If scalar function is used for array formula or dynamic array formula, the function is called for each element separately.
Non-scalar function. At least one of arguments of the function accepts a range. It means that
implicit intersection works differently.
Function has side effects, e.g. it changes something.
HYPERLINK
Function returns array. Functions without this flag return a scalar value.
CalcEngine treats such functions differently for array formulas.
Which parameters of a function allow ranges. That is important for implicit intersection.None of parameters allow ranges.All parameters allow ranges.All parameters except marked ones allow ranges.Only marked parameters allow ranges.
Add a function to the registry.
Name of function in formulas.
Minimum number of parameters.
Maximum number of parameters.
A delegate of a function that will be called when function is supposed to be evaluated.
Flags that indicate some additional info about function.
Which parameters allow ranges to be argument. Useful for array formulas.
Index of parameter that is marked, start from 0
An extension methods
Aggregate all values in the arguments of a function into a single value. If any value is error, return the error.
A lot of functions take all argument values and aggregate the values to a different value.
These aggregation functions apply aggregation on each argument and if the argument is
a collection (array/reference), the aggregation function is also applied to each element of
the array/reference (e.g. SUM({1, 2}, 3) applies sum on each element of an array
{1,2} and thus result is 1+2+3).
Type of the value that is being aggregated.
Arguments of a function. Method goes over all elements of the arguments.
Calculation context.>
Initial value of the accumulator. It is used as an input into the first call of .
What should be the result of aggregation, if there are no elements. Common choices are
or the .
The aggregation function. First parameter is the accumulator, second parameter is the value of
current element taken from . Make sure the method is static lambda to
avoid useless allocations.
A function that converts a scalar value of an element into the or
an error if it can't be converted. Make sure the method is static lambda to avoid useless allocations.
Some functions skip elements in a array/reference that would be accepted as an argument,
e.g. SUM("1", {2,"4"}) is 3 - it converts string "3" to a number 3
in for root arguments, but omits element "4" in the array. This is a function that
determines which elements to include and which to skip. If null, all elements of array are included and
all values are treated same. Make sure the method is static lambda to avoid useless allocations.
Calculates number of business days, taking into account:
- weekends (Saturdays and Sundays)
- bank holidays in the middle of the week
First day in the time interval
Last day in the time interval
List of bank holidays excluding weekends
Number of business days during the 'span'
Find a row with a value of same type as
between values and - 1.
We know that both and
contain value of the same type, so we always get a valid row.
Find row index of an element with same type as the lookup value. Go from
to the by a step
of . If there isn't any such row, return -1.
A collection of adapter functions from a more a generic formula function to more specific ones.
A function to Join text https://support.office.com/en-us/article/textjoin-function-357b449a-ec91-49d0-80c3-0e8fc845691c
Parameters
string
Delimiter in first param must be a string
or
Second param must be a boolean (TRUE/FALSE)
Reference is a collection of cells in the workbook. It's used in formula evaluation.
Every reference has at least one cell.
Ctor that reuses parameter to keep allocations low - don't modify the collection after it is passed to ctor.
List of areas of the range (at least one). All areas are valid and normalized. Some areas have worksheet and some don't.
An iterator over all nonblank cells of the range. Some cells can be iterated
over multiple times (e.g. a union of two ranges with overlapping cells).
Do an implicit intersection of an address.
An address of the intersection or error if intersection failed.
A representation of a value as a discriminated union.
A bare bone copy of OneOf that can be more optimized:
readonly struct to get rid of defensive copiesstruct can be smaller through offsets (based on NoBox)allows to pass additional arguments to Match function to skip a need to instantiate a new lambda instance on each call and allow easier inlining.
A blank value of a scalar. It can behave as a 0 or empty string, depending on context.
A1+5 is a number 5, blank behaves as 0, A1 & "text" is a "text", blank behaves as empty string.
Convert value to text. Error is not convertible.
Convert value to number. Error is not convertible.
Does this value have same type as the other one?
Get the logical value, if it is either blank (false), logical or number (0 = false, otherwise true)a text TRUE or FALSE (case insensitive).
Used for coercion in functions.
A comparer of a scalar logic. Each comparer with it's logic can be accessed through a static property.
Compare scalar values according to logic of "Sort" data in Excel, though texts are compared case insensitive.
Order is
Type Number, from low to highType Text, from low to high (non-culture specific, ordinal compare)Type Logical, FALSE, then TRUE.Type Error, all error values are treated as equal (at least they don't change order).Type Blank, all values are treated as equal.
A parser of timespan format used by excel during coercion from text to number. parsing methods
don't allow for several features required by excel (e.g. seconds/minutes over 60, hours over 24).
Parser can parse following formats from ECMA-376, Part 1, ยง18.8.30. due to standard text-to-number coercion:
Format 20 - h:mm.Format 21 - h:mm:ss.Format 47 - mm:ss.0 (format is incorrectly described as mmss.0 in the standard,
but fixed in an implementation errata).
Timespan is never interpreted through format 45 (mm:ss), instead preferring the format 20 (h:mm).
Timespan is never interpreted through format 46 ([h]:mm:ss], such values are covered by format 21 (h:mm:ss).
Note that the decimal fraction differs format 20 and 47, thus mere addition of decimal
place means significantly different values. Parser also copies features of Excel, like whitespaces around
a decimal place (10:20 . 5 is allowed).
20:30 is detected as format 20 and the first number is interpreted as hours, thus the serial time is 0.854167.
20:30.0 is detected as format 47 and the first number is interpreted as minutes, thus the serial time is 0.014236111.
A wildcard is at most 255 chars long text. It can contain * which indicates any number characters (including zero)
and ? which indicates any single character. If you need to find * or ? in a text, prefix them with
an escape character ~.
Search for the wildcard anywhere in the text.
Text used to search for a pattern.
zero-based index of a first character in a text that matches to a pattern or -1, if match wasn't found.
Check if a segment can be found in a text.
Non-empty pattern without * wildcard, though it can contain ? and escaped *.
Non-empty text.
First index of the pattern in the or -1 if not found.
Get cells that could be used as input of a formula, that could affect the calculated value.
Doesn't work for ranges determined by reference functions and reference operators, e.g. A1:IF(SomeCondition,B1,C1).
Formula to analyze.
Worksheet used for ranges without sheet.
All cells (including newly created blank ones) that are referenced in the formula.
True if it was possible for get precedent cells, false otherwise (e.g. reference errors).
Unable to determine all references, e.g. sheet doesn't exist.
Get all ranges in the formula. Note that just because range
is in the formula, it doesn't mean it is actually used during evaluation.
Because named ranges can change, the result might change between visits.
Comparer of ranges that ignores whether row/column is fixes or not.
A blank value. Used as a value of blank cells or as an optional argument for function calls.
Represents the sole instance of the class.
A formula error.
Keep order of errors in same order as value returned by ERROR.TYPE,
because it is used for comparison in some case (e.g. AutoFilter).
Values are off by 1, so default produces a valid error.
#NULL! - Intended to indicate when two areas are required to intersect, but do not.
The space is an intersection operator.SUM(B1 C1) tries to intersect B1:B1 area and C1:C1 area, but since there are no intersecting cells, the result is #NULL.#DIV/0! - Intended to indicate when any number (including zero) or any error code is divided by zero.
#VALUE! - Intended to indicate when an incompatible type argument is passed to a function, or an incompatible type operand is used with an operator.
Passing a non-number text to a function that requires a number, trying to get an area from non-contiguous reference. Creating an area from different sheets Sheet1!A1:Sheet2!A2#REF! - a formula refers to a cell that's not valid.
When unable to find a sheet or a cell.#NAME? - Intended to indicate when what looks like a name is used, but no such name has been defined.
Only for named ranges, not sheets.TestRange*10 when the named range doesn't exist will result in an error.#NUM! - Intended to indicate when an argument to a function has a compatible type, but has a value that is outside the domain over which that function is defined.
This is known as a domain error.ASIN(10) - the ASIN accepts only argument -1..1 (an output of SIN), so the resulting value is #NUM!.#N/A - Intended to indicate when a designated value is not available.
The value is used for extra cells of an array formula that is applied on an array of a smaller size that the array formula.
An interface for methods of without specified type of an element.
Is at least one cell in the slice used?
Get maximum used column in the slice or 0, if no column is used.
Get maximum used row in the slice or 0, if no row is used.
A set of columns that have at least one used cell. Order of columns is non-deterministic.
A set of rows that have at least one used cell. Order of rows is non-deterministic.
Clear all values in the range and mark them as unused.
Clear all values in the and shift all values right of the deleted area to the deleted place.
Clear all values in the and shift all values below the deleted area to the deleted place.
Shift all values at the and all cells below it
down by of the .
The insert area is cleared.
Shift all values at the and all cells right of it
to the right by of the .
The insert area is cleared.
A value that is in the cell.
The value is a blank (either blank cells or the omitted optional argument of a function, e.g. IF(TRUE,,).
Keep as the first, so the default values are blank.
The value is a logical value.
The value is a double-precision floating points number, excluding ,
or .
A text or a rich text. Can't be null and can be at most 32767 characters long.
The value is one of .
The value is a , represented as a serial date time number.
Serial date time 60 is a 1900-02-29, nonexistent day kept for compatibility,
but unrepresentable by DateTime. Don't use.
The value is a , represented in a serial date time (24 hours is 1, 36 hours is 1.5 ect.).
Gets this cell's address, relative to the worksheet.The cell's address.
Get the value of a cell without evaluation of a formula. If the cell contains
a formula, it returns the last calculated value or a blank value. If the cell
doesn't contain a formula, it returns same value as .
May hold invalid value when flag is True.
Can be useful to decrease a number of formula evaluations.
Returns the current region. The current region is a range bounded by any combination of blank rows and blank columns
The current region.
Gets the type of this cell's data.
The type of the cell's data.
Gets or sets the cell's formula with A1 references.
The formula with A1 references.
Gets or sets the cell's formula with R1C1 references.
The formula with R1C1 references.
An indication that value of this cell is calculated by a array formula
that calculates values for cells in the referenced address. Null if not part of such formula.
Flag indicating that previously calculated cell value may be not valid anymore and has to be re-evaluated.
Gets or sets a value indicating whether this cell's text should be shared or not.
If false the cell's text will not be shared and stored as an inline value.
Gets or sets the cell's style.
Gets or sets the cell's value.
Getter will return value of a cell or value of formula. Getter will evaluate a formula, if the cell
, before returning up-to-date value.
Setter will clear a formula, if the cell contains a formula.
If the value is a text that starts with a single quote, setter will prefix the value with a single quote through
in Excel too and the value of cell is set to to non-quoted text.
Should the cell show phonetic (i.e. furigana) above the rich text of the cell?
It shows phonetic runs in the rich text, it is not autogenerated. Default
is false.
Creates a named range out of this cell.
If the named range exists, it will add this range to that named range.The default scope for the named range is Workbook.
Name of the range.
Creates a named range out of this cell.
If the named range exists, it will add this range to that named range.
Name of the range.
The scope for the named range.
Creates a named range out of this cell.
If the named range exists, it will add this range to that named range.
Name of the range.
The scope for the named range.
The comments for the named range.
Returns this cell as an IXLRange.
Clears the contents of this cell.
Specify what you want to clear.
Copy range content to an area of same size starting at the cell.
Original content of cells is overwritten.
Range whose content to copy.
This cell.
Creates a new comment for the cell, replacing the existing one.
Creates a new data validation rule for the cell, replacing the existing one.
Creates a new hyperlink replacing the existing one.
Replaces a value of the cell with a newly created rich text object.
Deletes the current cell and shifts the surrounding cells according to the shiftDeleteCells parameter.
How to shift the surrounding cells.
Returns the comment for the cell or create a new instance if there is no comment on the cell.
Returns a data validation rule assigned to the cell, if any, or creates a new instance of data validation rule if no rule exists.
Gets the cell's value as a Boolean.
Shortcut for Value.GetBoolean()If the value of the cell is not a logical.
Gets the cell's value as a Double.
Shortcut for Value.GetNumber()If the value of the cell is not a number.
Gets the cell's value as a String.
Shortcut for Value.GetText(). Returned value is never null.If the value of the cell is not a text.
Gets the cell's value as a XLError.
Shortcut for Value.GetError()If the value of the cell is not an error.
Gets the cell's value as a DateTime.
Shortcut for Value.GetDateTime()If the value of the cell is not a DateTime.
Gets the cell's value as a TimeSpan.
Shortcut for Value.GetTimeSpan()If the value of the cell is not a TimeSpan.
Try to get cell's value converted to the T type.
Supported types:
Boolean - uses a logic of Number (s/byte, u/short, u/int, u/long, float, double, or decimal)
- uses a logic of and succeeds,
if the value fits into the target type.String - sets the result to a text representation of a cell value (using current culture).DateTime - uses a logic of TimeSpan - uses a logic of XLError - if the value is of type , it will return the value.Enum - tries to parse a value to a member by comparing the text of a cell value and a member name.
If the is a nullable value type and the value of cell is blank or empty string, return null value.
If the cell value can't be determined because formula function is not implemented, the method always returns false.
The requested type into which will the value be converted.
Value to store the value.
true if the value was converted and the result is in the , false otherwise.Conversion logic is identical with .The requested type into which will the value be converted.If the value can't be converted to the type of T
Return cell's value represented as a string. Doesn't use cell's formatting or style.
Gets the cell's value formatted depending on the cell's data type and style.
Returns a hyperlink for the cell, if any, or creates a new instance is there is no hyperlink.
Returns the value of the cell if it formatted as a rich text.
Inserts the IEnumerable data elements and returns the range it occupies.
The IEnumerable data.
Inserts the IEnumerable data elements and returns the range it occupies.
The IEnumerable data.
if set to true the data will be transposed before inserting.
Inserts the data of a data table.
The data table.
The range occupied by the inserted data
Inserts the IEnumerable data elements as a table and returns it.
The new table will receive a generic name: Table#
The table data.
Inserts the IEnumerable data elements as a table and returns it.
The new table will receive a generic name: Table#
The table data.
if set to true it will create an Excel table.
if set to false the table will be created in memory.
Creates an Excel table from the given IEnumerable data elements.
The table data.
Name of the table.
Inserts the IEnumerable data elements as a table and returns it.
The table data.
Name of the table.
if set to true it will create an Excel table.
if set to false the table will be created in memory.
Inserts the DataTable data elements as a table and returns it.
The new table will receive a generic name: Table#
The table data.
Inserts the DataTable data elements as a table and returns it.
The new table will receive a generic name: Table#
The table data.
if set to true it will create an Excel table.
if set to false the table will be created in memory.
Creates an Excel table from the given DataTable data elements.
The table data.
Name of the table.
Inserts the DataTable data elements as a table and returns it.
The table data.
Name of the table.
if set to true it will create an Excel table.
if set to false the table will be created in memory.
Invalidate so the formula will be re-evaluated next time is accessed.
If cell does not contain formula nothing happens.
This cell.
Returns a string that represents the current state of the cell according to the format.
A: address, F: formula, NF: number format, BG: background color, FG: foreground color, V: formatted value
Sets the cells' value.
Setter will clear a formula, if the cell contains a formula.
If the value is a text that starts with a single quote, setter will prefix the value with a single quote through
in Excel too and the value of cell is set to to non-quoted text.
Clears the contents of these cells.
Specify what you want to clear.
Delete the comments of these cells.
Delete the sparklines of these cells.
Sets the cells' formula with A1 references.
The formula with A1 references.
Sets the cells' formula with R1C1 references.
The formula with R1C1 references.
Slice is a sparse array that stores a part of cell information (e.g. only values,
only styles ...). Slice has same size as a worksheet. If some cells are pushed out
of the permitted range, they are gone.
This is a ref return, so if the underlaying value
changes, the returned value also changes. To avoid,
just don't use ref and structs will be copied.
The type of data stored in the slice.
The content of the slice. Note that LUT uses index that starts from 0,
so rows and columns must be adjusted to retrieved the value.
Key is column number, value is number of cells in the column that are used.
Get the slice value at the specified point of the sheet.
Get the slice value at the specified point of the sheet.
Get enumerator over used values of the range.
Enumerator that returns used values from a specified range.
The movement is columns first, then rows.
Memory efficient look up table. The table is 2-level structure,
where elements of the the top level are potentially nullable
references to buckets of up-to 32 items in bottom level.
Both level can increase size through doubling, through
only the top one can be indefinite size.
The default value lut ref returns for elements not defined in the lut.
A sparse array of values in the lut. The top level always allocated at least one element.
Get maximal node that is used. Return -1 if LUT is unused.
Does LUT contains at least one used element?
Get a value at specified index.
Index, starting at 0.
Reference to an element at index, if the element is used, otherwise .
Does the index set a mask of used index (=was value set and not cleared)?
Set/clar an element at index to a specified value.
The used flag will be if the value is default or not.
A bucket of bottom layer of LUT. Each bucket has up-to 32 elements.
A bitmap array that indicates which nodes have a set/no-default values values
(1 = value has been set and there is an element in the ,
0 = value hasn't been set and might exist or not).
If the element at some index is not is not set and lut is asked for a value,
it should return .
The length of the bitmap array is same as the , for each
bottom level bucket, the element of index 0 in the bucket is represented by
lowest bit, element 31 is represented by highest bit.
This is useful to make a distinction between a node that is empty
and a node that had it's value se to .
Enumerator of LUT used values from low index to high.
Create a new enumerator from subset of elements.
Lookup table to traverse.
First desired index, included.
Last desired index, included.
Index of current element in the LUT. Only valid, if enumerator is valid.
Enumerator of LUT used values from high index to low index.
A flag indicating if a string should be stored in the shared table or inline.
Overriden , because we can't store the value
in the cell.
A formula in the cell. Null, if cell doesn't contain formula.
The value of that
workbook had at the moment of last value or formula change.
Flag showing that the cell is in formula evaluation state.
Perform an evaluation of cell formula. If cell does not contain formula nothing happens, if cell does not need
recalculation ( is False) nothing happens either, unless flag is specified.
Otherwise recalculation is performed, result value is preserved in and returned.
Flag indicating whether a recalculation must be performed even is cell does not need it.
Null if cell does not contain a formula. Calculated value otherwise.
Set only value, don't clear formula, don't set format.
Sets the value even for merged cells.
Flag indicating that previously calculated cell value may be not valid anymore and has to be re-evaluated.
The sparkline assigned to the cell
Get the data validation rule containing current cell.
The data validation rule applying to the current cell or null if there is no such rule.
Ensure the cell has style set directly on the cell, not inherited from column/row/worksheet styles.
Get glyph bounding boxes for each grapheme in the text. Box size is determined according to
the font of a grapheme. New lines are represented as default (all dimensions zero) box.
A line without any text (i.e. contains only new line) should be represented by a box
with zero advance width, but with a line height of corresponding font.
Engine used to determine box size.
DPI used to determine size of glyphs.
List where items are added.
A representation of a cell formula, not the formula itself (i.e. the tree).
This is only a placeholder, so the data table formula looks like array formula for saving code.
First argument is replaced by value from current row, second is replaced by value from current column.
The recalculation status of the last time formula was checked whether it needs to be recalculated.
The value of that workbook had at the moment of cell formula evaluation.
If this value equals to it indicates that stores
correct value and no re-evaluation has to be performed.
Formula in A1 notation. Either this or must be set (potentially
both, due to conversion from one notation to another).
Formula in R1C1 notation. Either this or must be set (potentially
both, due to conversion from one notation to another).
Range for array and data table formulas, otherwise default value.
True, if 1D data table formula is the row (the displayed formula in Excel is missing the second argument {=TABLE(A1;)}).
False the 1D data table is a column. (the displayed formula in Excel is missing the first argument {=TABLE(;A1)})
This property is meaningless, if called for non-data-table formula.
If data table is in row (i.e. the value returns true) that means it calculates values in a row,
it takes formula from a cell from a column one less than its range and replaces the input cell with value
at the intersection of current cell column and the top row of the range. When data table is a column, it works
pretty much same, except axis are reversed.
Just because data table is 1D doesn't mean its range has to be. It can be rectangular even for 1D
data table. It just means that data table is applied separately to each row/column (depending on whether
the data table is row or column).
True, if data table is 2D and uses both inputs. Input1 is replaced by
value from current row, input2 is replaced by a value from current column.
This property is meaningless, if called for non-data-table formula.
Returns a cell that data table formula uses as a variable to replace with values
for the actual table. Used for 1D data table formula as a single input (row or column)
and as row for 2D data table. Must be present, even if input marked as deleted.
This property is meaningless, if called for non-data-table formula.
Returns a cell that 2D data table formula uses as a variable to replace with values
for the actual table. The value is taken from the top of range of the current column.
Must be present for 2D, even if input marked as deleted.
This property is meaningless, if called for non-data-table formula.
Returns true, if data table formula has its input1 deleted.
This property is meaningless, if called for non-data-table formula.
Returns true, if data table formula has its input1 deleted.
This property is meaningless, if called for non-data-table formula.
Flag indicating that previously calculated cell value may be not valid anymore and has to be re-evaluated.
Get stored formula in A1 notation. Returned formula doesn't contain equal sign.
Address of the formula cell. Used to convert relative R1C1 to A1, if conversion is necessary.
Get stored formula in R1C1 notation. Returned formula doesn't contain equal sign.
Calculate a value of the specified formula.
Cell formula to evaluate in A1 format.
Cell whose formula is being evaluated.
Calculate array formula and return an array of the array formula range size.
A factory method to create a normal A1 formula. Doesn't affect recalculation version.
Doesn't start with =.
A factory method to create a normal R1C1 formula. Doesn't affect recalculation version.
Doesn't start with =.
A factory method to create an array formula. Doesn't affect recalculation version.
Isn't wrapped in {} and doesn't start with =.
A range of cells that are calculated through the array formula.
A flag for always calculate array.
A factory method to create a cell formula for 1D data table formula. Doesn't affect recalculation version.
Range of the data table formula. Even 1D table can have rectangular range.
Address of the input cell that will be replaced in the data table. If input deleted, ignored and value can be anything.
Was the original address deleted?
Is data table in row (true) or columns (false)?
A factory method to create a 2D data table formula. Doesn't affect recalculation version.
Range of the formula.
Address of the input cell that will be replaced in the data table. If input deleted, ignored and value can be anything.
Was the original address deleted?
Address of the input cell that will be replaced in the data table. If input deleted, ignored and value can be anything.
Was the original address deleted?
An enum to efficiently store various flags for formulas (bool takes up 1-4 bytes due to alignment).
Note that each type of formula uses different flags.
For Array formula. Not fully clear from documentation, but seems to be some kind of dirty flag.
Current excel just writes ca="1" to each cell of array formula for cases described in the DOC.
For data table formula. Flag whether the data table is 2D and has two inputs.
For data table formula. If the set, the data table is in row, not column. It uses input1 in both case, but the position
is interpreted differently.
For data table formula. When the input 1 cell has been deleted (not content, but the row or a column where cell was),
this flag is set.
For data table formula. When the input 2 cell has been deleted (not content, but the row or a column where cell was),
this flag is set.
The value of that workbook had at the moment of determining whether the cell
needs re-evaluation (due to it has been edited or some of the affecting cells has). If this value equals to
it indicates that stores correct value and no check has to be performed.
Get all used cells in the worksheet.
Get all used cells in the worksheet that satisfy the predicate.
Get all used cells in the range that satisfy the predicate.
Get all used cells in the range that satisfy the predicate.
Get cell or null, if cell is not used.
Gets or sets the width of this column in number of characters (NoC).
NoC are a non-linear units displayed as a column width in Excel, next to pixels. NoC combined with default font
of the workbook can express width of the column in pixels and other units.
Deletes this column and shifts the columns at the right of this one accordingly.
Don't use in a loop due to poor performance. Use instead.
Gets this column's number
Gets this column's letter
Inserts X number of columns at the right of this one.
All columns at the right will be shifted accordingly.
The number of columns to insert.
Inserts X number of columns at the left of this one.
This column and all at the right will be shifted accordingly.
The number of columns to insert.
Gets the cell in the specified row.
The cell's row.
Returns the specified group of cells, separated by commas.
e.g. Cells("1"), Cells("1:5"), Cells("1,3:5")
The column cells to return.
Returns the specified group of cells.
The first row in the group of cells to return.
The last row in the group of cells to return.
Adjusts the width of the column based on its contents.
Adjusts the width of the column based on its contents, starting from the startRow.
The row to start calculating the column width.
Adjusts the width of the column based on its contents, starting from the startRow and ending at endRow.
The row to start calculating the column width.
The row to end calculating the column width.
Adjust width of the column according to the content of the cells.
Number of a first row whose content is considered.
Number of a last row whose content is considered.
Minimum width of adjusted column, in NoC.
Maximum width of adjusted column, in NoC.
Hides this column.
Unhides this column.
Gets a value indicating whether this column is hidden or not.
true if this column is hidden; otherwise, false.
Gets or sets the outline level of this column.
The outline level of this column.
Adds this column to the next outline level (Increments the outline level for this column by 1).
Adds this column to the next outline level (Increments the outline level for this column by 1).
If set to true the column will be shown collapsed.
Sets outline level for this column.
The outline level.
Sets outline level for this column.
The outline level.
If set to true the column will be shown collapsed.
Adds this column to the previous outline level (decrements the outline level for this column by 1).
Adds this column to the previous outline level (decrements the outline level for this column by 1).
If set to true it will remove this column from all outline levels.
Show this column as collapsed.
Expands this column (if it's collapsed).
Adds a vertical page break after this column.
Clears the contents of this column.
Specify what you want to clear.
Sets the width of all columns.
The width of all columns.
Deletes all columns and shifts the columns at the right of them accordingly.
Adjusts the width of all columns based on its contents.
Adjusts the width of all columns based on its contents, starting from the startRow.
The row to start calculating the column width.
Adjusts the width of all columns based on its contents, starting from the startRow and ending at endRow.
The row to start calculating the column width.
The row to end calculating the column width.
Hides all columns.
Unhides all columns.
Increments the outline level of all columns by 1.
Increments the outline level of all columns by 1.
If set to true the columns will be shown collapsed.
Sets outline level for all columns.
The outline level.
Sets outline level for all columns.
The outline level.
If set to true the columns will be shown collapsed.
Decrements the outline level of all columns by 1.
Decrements the outline level of all columns by 1.
If set to true it will remove the columns from all outline levels.
Show all columns as collapsed.
Expands all columns (if they're collapsed).
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
if set to true will return all cells with a value or a style different than the default.
Adds a vertical page break after these columns.
Clears the contents of these columns.
Specify what you want to clear.
The direct constructor should only be used in .
Calculate column width in pixels according to the content of cells.
First row number whose content is used for determination.
Last row number whose content is used for determination.
Engine to determine size of glyphs.
DPI of the worksheet.
Adds a vertical page break after this column.
Create a new instance of .
If worksheet is specified it means that the created instance represents
all columns on a worksheet so changing its width will affect all columns.
Default style to use when initializing child entries.
A predefined enumerator of to support lazy initialization.
Adds a vertical page break after this column.
Gets or sets this comment's author's name
Sets the name of the comment's author
Author's name
Adds a bolded line with the author's name
The first of the .
The method consolidate the same conditional formats, which are located in adjacent ranges.
Reorders the according to original priority. Done during load process
Reference to a single cell in a workbook. Reference can be absolute, relative or mixed.
Reference can be with or without a worksheet.
Worksheet of the reference. Value is null for address without a worksheet.
Create address without worksheet. For calculation only!
Initializes a new struct using a mixed notation. Attention: without worksheet for calculation only!
The row number of the cell address.
The column letter of the cell address.
Initializes a new struct using a mixed notation.
The row number of the cell address.
The column letter of the cell address.
Initializes a new struct using R1C1 notation. Attention: without worksheet for calculation only!
The row number of the cell address.
The column number of the cell address.
Initializes a new struct using R1C1 notation.
The row number of the cell address.
The column number of the cell address.
Gets the row number of this address.
Gets the column number of this address.
Gets the column letter(s) of this address.
An point (address) in a worksheet, an equivalent of ST_CellRef.
Unlike the XLAddress, sheet can never be invalid.
1-based row number in a sheet.
1-based column number in a sheet.
Parse point per type ST_CellRef from
2.1.1108 Part 4 Section 3.18.8, ST_CellRef (Cell Reference)
Input text
If the input doesn't match expected grammar.
Write the sheet point as a reference to the span (e.g. A1).
Must be at least 10 chars long
Number of chars
Create a sheet point from the address. Workbook is ignored.
Is the point within the range or below the range?
Is the point within the range or to the left of the range?
A representation of a ST_Ref, i.e. an area in a sheet (no reference to the sheet).
A range that covers whole worksheet.
Top-left point of the sheet range.
Bottom-right point of the sheet range.
Parse point per type ST_Ref from
2.1.1119 Part 4 Section 3.18.64, ST_Ref (Cell Range Reference)Can be one cell reference (A1) or two separated by a colon (A1:B2). First reference is always in top left corner
Input text
If the input doesn't match expected grammar.
Write the sheet range to the span. If range has only one cell, write only the cell.
Must be at least 21 chars long.
Number of written characters.
Return a range that contains all cells below the current range.
The range touches the bottom border of the sheet.
Get a range below the current one rows.
If there isn't enough rows, use as many as possible.
The range touches the bottom border of the sheet.
Return a range that contains all cells to the right of the range.
The range touches the right border of the sheet.
A collection of ranges the data validation rule applies too.
Add a range to the collection of ranges this rule applies to.
If the specified range does not belong to the worksheet of the data validation
rule it is transferred to the target worksheet.
A range to add.
Add a collection of ranges to the collection of ranges this rule applies to.
Ranges that do not belong to the worksheet of the data validation
rule are transferred to the target worksheet.
Ranges to add.
Detach data validation rule of all ranges it applies to.
Remove the specified range from the collection of range this rule applies to.
A range to remove.
Add data validation rule to the collection. If the specified rule refers to another
worksheet than the collection, the copy will be created and its ranges will refer
to the worksheet of the collection. Otherwise the original instance will be placed
in the collection.
A data validation rule to add.
The instance that has actually been added in the collection
(may be a copy of the specified one).
Get all data validation rules applied to ranges that intersect the specified range.
Get the data validation rule for the range with the specified address if it exists.
A range address.
Data validation rule which ranges collection includes the specified
address. The specified range should be fully covered with the data validation rule.
For example, if the rule is applied to ranges A1:A3,C1:C3 then this method will
return True for ranges A1:A3, C1:C2, A2:A3, and False for ranges A1:C3, A1:C1, etc.
True is the data validation rule was found, false otherwise.
Add a range to the collection of ranges this rule applies to.
If the specified range does not belong to the worksheet of the data validation
rule it is transferred to the target worksheet.
A range to add.
Add a collection of ranges to the collection of ranges this rule applies to.
Ranges that do not belong to the worksheet of the data validation
rule are transferred to the target worksheet.
Ranges to add.
Detach data validation rule of all ranges it applies to.
Remove the specified range from the collection of range this rule applies to.
A range to remove.
The flag used to avoid unnecessary check for splitting intersected ranges when we already
are performing the splitting.
Get all data validation rules applied to ranges that intersect the specified range.
Get the data validation rule for the range with the specified address if it exists.
A range address.
Data validation rule which ranges collection includes the specified
address. The specified range should be fully covered with the data validation rule.
For example, if the rule is applied to ranges A1:A3,C1:C3 then this method will
return True for ranges A1:A3, C1:C2, A2:A3, and False for ranges A1:C3, A1:C1, etc.
True is the data validation rule was found, false otherwise.
Class used for indexing data validation rules.
Gets an object with the boundaries of this range.
Type of image. The supported formats are defined by OpenXML's ImagePartType.
Default value is "jpeg"
Current width of the picture in pixels.
Current height of the picture in pixels.
Original height of the picture in pixels.
Original width of the picture in pixels.
Create a copy of the picture on a different worksheet.
The worksheet to which the picture will be copied.
A created copy of the picture.
Deletes this picture.
Create a copy of the picture on the same worksheet.
A created copy of the picture.
Create a copy of the picture on a different worksheet.
The worksheet to which the picture will be copied.
A created copy of the picture.
Create a copy of the picture on the same worksheet.
A created copy of the picture.
A universal interface for different data readers used in InsertData logic.
Get a collection of records, each as a collection of values, extracted from a source.
Get the number of properties to use as a table with.
Actual number of may vary in different records.
Get the title of the property with the specified index.
Get the total number of records.
Constants used across writers.
Valid and shorter than normal true.
Valid and shorter than normal false.
Stream detached worksheet DOM to the worksheet part stream.
Replaces the content of the part.
An array to convert data type for a formula cell. Key is .
It saves some performance through direct indexation instead of switch.
An array to convert data type for a cell that only contains a value. Key is .
It saves some performance through direct indexation instead of switch.
Gets or sets the column after which the horizontal split should take place.
Gets or sets the row after which the vertical split should take place.
Gets or sets the location of the top left visible cell
The scroll position's top left cell.
Window zoom magnification for current view representing percent values. Horizontal and vertical scale together.
Representing percent values ranging from 10 to 400.
Zoom magnification to use when in normal view. Horizontal and vertical scale together
Representing percent values ranging from 10 to 400.
Zoom magnification to use when in page layout view. Horizontal and vertical scale together.
Representing percent values ranging from 10 to 400.
Zoom magnification to use when in page break preview. Horizontal and vertical scale together.
Representing percent values ranging from 10 to 400.
Freezes the specified rows and columns.
The rows to freeze.
The columns to freeze.
Freezes the left X columns.
The columns to freeze.
Freezes the top X rows.
The rows to freeze.
Gets or sets the workbook's calculation mode.
Gets or sets the default column width for the workbook.
All new worksheets will use this column width.
Gets an object to manipulate this workbook's named ranges.
Gets or sets the default outline options for the workbook.
All new worksheets will use these outline options.
Gets or sets the default page options for the workbook.
All new worksheets will use these page options.
Gets all pivot caches in a workbook. A one cache can be
used by multiple tables. Unused caches are not saved.
Gets or sets the workbook's properties.
Gets or sets the workbook's reference style.
Gets or sets the default row height for the workbook.
All new worksheets will use this row height.
Gets or sets the default style for the workbook.
All new worksheets will use this style.
Gets an object to manipulate this workbook's theme.
Gets an object to manipulate the worksheets.
Add a worksheet with a table at Cell(row:1, column:1). The dataTable's name is used for the
worksheet name. The name of a table will be generated as Table{number suffix}.
Datatable to insert
Inserted Worksheet
Add a worksheet with a table at Cell(row:1, column:1). The sheetName provided is used for the
worksheet name. The name of a table will be generated as Table{number suffix}.
dataTable to insert as Excel Table
Worksheet and Excel Table name
Inserted Worksheet
Add a worksheet with a table at Cell(row:1, column:1).
dataTable to insert as Excel Table
Worksheet name
Excel Table name
Inserted Worksheet
Evaluate a formula expression.
Formula expression to evaluate.
If the expression contains a function that requires a context (e.g. current cell or worksheet).
Force recalculation of all cell formulas.
Saves the current workbook.
Saves the current workbook and optionally performs validation
Saves the current workbook to a file.
Saves the current workbook to a file and optionally validates it.
Saves the current workbook to a stream.
Saves the current workbook to a stream and optionally validates it.
Searches the cells' contents for a given piece of text
The search text.
The compare options.
if set to true search formulae instead of cell values.
Gets the Excel table of the given name
Name of the table to return.
One of the enumeration values that specifies how the strings will be compared.
The table with given nameIf no tables with this name could be found in the workbook.
Gets the workbook that contains this worksheet
Gets or sets the default column width for this worksheet.
Gets or sets the default row height for this worksheet.
Gets or sets the name (caption) of this worksheet.
Gets or sets the position of the sheet.
When setting the Position all other sheets' positions are shifted accordingly.
Gets an object to manipulate the sheet's print options.
Gets an object to manipulate the Outline levels.
Gets the first row of the worksheet.
Gets the first non-empty row of the worksheet that contains a cell with a value.
Formatted empty cells do not count.
Gets the first non-empty row of the worksheet that contains a cell with a value.
The options to determine whether a cell is used.
Gets the last row of the worksheet.
Gets the last non-empty row of the worksheet that contains a cell with a value.
Gets the last non-empty row of the worksheet that contains a cell with a value.
The options to determine whether a cell is used.
Gets the first column of the worksheet.
Gets the first non-empty column of the worksheet that contains a cell with a value.
Gets the first non-empty column of the worksheet that contains a cell with a value.
The options to determine whether a cell is used.
Gets the last column of the worksheet.
Gets the last non-empty column of the worksheet that contains a cell with a value.
Gets the last non-empty column of the worksheet that contains a cell with a value.
The options to determine whether a cell is used.
Gets a collection of all columns in this worksheet.
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")
The columns to return.
Gets a collection of the specified columns in this worksheet.
The first column to return.
The last column to return.
Gets a collection of the specified columns in this worksheet.
The first column to return.
The last column to return.
Gets a collection of all rows in this worksheet.
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")
The rows to return.
Gets a collection of the specified rows in this worksheet.
The first row to return.
The last row to return.
Gets the specified row of the worksheet.
The worksheet's row.
Gets the specified column of the worksheet.
The worksheet's column.
Gets the specified column of the worksheet.
The worksheet's column.
Gets the cell at the specified row and column.
The cell's row.
The cell's column.
Gets the cell at the specified address.
The cell address in the worksheet.
Gets the cell at the specified row and column.
The cell's row.
The cell's column.
Gets the cell at the specified address.
The cell address in the worksheet.
Returns the specified range.
The range boundaries.
Returns the specified range.e.g. Range("A1"), Range("A1:C2")
The range boundaries.
Returns the specified range.
The first cell in the range.
The last cell in the range.
Returns the specified range.
The first cell address in the worksheet.
The last cell address in the worksheet.
Returns the specified range.
The first cell address in the worksheet.
The last cell address in the worksheet.
Returns a collection of ranges, separated by commas.e.g. Ranges("A1"), Ranges("A1:C2"), Ranges("A1:B2,D1:D4")
The ranges to return.
Returns the specified range.
The first cell's row of the range to return.
The first cell's column of the range to return.
The last cell's row of the range to return.
The last cell's column of the range to return.
.Gets the number of rows in this worksheet.Gets the number of columns in this worksheet.
Collapses all outlined rows.
Collapses all outlined columns.
Expands all outlined rows.
Expands all outlined columns.
Collapses the outlined rows of the specified level.
The outline level.
Collapses the outlined columns of the specified level.
The outline level.
Expands the outlined rows of the specified level.
The outline level.
Expands the outlined columns of the specified level.
The outline level.
Deletes this worksheet.
Gets an object to manage this worksheet's named ranges.
Gets the specified named range.
Name of the range.
Gets an object to manage how the worksheet is going to displayed by Excel.
Gets the Excel table of the given index
Index of the table to return
Gets the Excel table of the given name
Name of the table to return
Gets an object to manage this worksheet's Excel tables
Copies the
Copy a worksheet from this workbook to a different workbook as a new sheet.
Workbook into which copy this sheet.
Name of new sheet in the where will the data be copied. Sheet will be in the last position.
Newly created sheet in the .
Evaluate an formula and return a result.
Formula to evaluate.
A cell address that is used to provide context for formula calculation (mostly implicit intersection).
If was needed for some part of calculation.
Force recalculation of all cell formulas.
A class that defines various aspects of a newly created workbook.
A graphics engine that will be used for workbooks without explicitly set engine.
Should all formulas in a workbook be recalculated during load? Default value is false.
Graphic engine used by the workbook.
DPI for the workbook. Default is 96.
Used in various places, e.g. determining a physical size of an image without a DPI or to determine a size of a text in a cell.
Gets or sets the comment for this named range.
The comment for this named range.
Checks if the named range contains invalid references (#REF!).
Gets or sets the name of the range.
The name of the range.
Gets the ranges associated with this named range.
Note: A named range can point to multiple ranges.
Gets the scope of this named range.
Gets or sets the visibility of this named range.
true if visible; otherwise, false.
Adds the specified range to this named range.
Note: A named range can point to multiple ranges.
Workbook containing the range
The range address to add.
Adds the specified range to this named range.
Note: A named range can point to multiple ranges.
The range to add.
Adds the specified ranges to this named range.
Note: A named range can point to multiple ranges.
The ranges to add.
Clears the list of ranges associated with this named range.
(it does not clear the cells)
Deletes this named range (not the cells).
Removes the specified range from this named range.
Note: A named range can point to multiple ranges.
The range address to remove.
Removes the specified range from this named range.
Note: A named range can point to multiple ranges.
The range to remove.
Removes the specified ranges from this named range.
Note: A named range can point to multiple ranges.
The ranges to remove.
Gets the specified named range.
Name of the range.
Adds a new named range.
Name of the range to add.
The range address to add.
Adds a new named range.
Name of the range to add.
The range to add.
Adds a new named range.
Name of the range to add.
The ranges to add.
Adds a new named range.
Name of the ranges to add.
The range address to add.
The comment for the new named range.
Adds a new named range.
Name of the ranges to add.
The range to add.
The comment for the new named range.
Adds a new named range.
Name of the ranges to add.
The ranges to add.
The comment for the new named range.
Deletes the specified named range (not the cells).
Name of the range to delete.
Deletes the specified named range's index (not the cells).
Index of the named range to delete.
Deletes all named ranges (not the cells).
Returns a subset of named ranges that do not have invalid references.
Returns a subset of named ranges that do have invalid references.
Checks if the named range contains invalid references (#REF!).
Adds the specified range name.
Name of the range.
The range address.
The comment.
if set to true validates the name.
if set to true range address will be checked for validity.
For named ranges in the workbook scope, specify the sheet name in the reference.
Returns a subset of named ranges that do not have invalid references.
Returns a subset of named ranges that do have invalid references.
Gets the left header/footer item.
Gets the middle header/footer item.
Gets the right header/footer item.
Gets the text of the specified header/footer occurrence.
The occurrence.
Gets the text of the specified header/footer occurrence.
The occurrence.
Adds the given predefined text to this header/footer item.
The predefined text to add to this header/footer item.
Adds the given text to this header/footer item.
The text to add to this header/footer item.
The occurrence for the text.
Adds the given predefined text to this header/footer item.
The predefined text to add to this header/footer item.
The occurrence for the predefined text.
Clears the text/formats of this header/footer item.
The occurrence to clear.
Gets or sets the Left margin.The Left margin.Gets or sets the Right margin.The Right margin.Gets or sets the Top margin.The Top margin.Gets or sets the Bottom margin.The Bottom margin.Gets or sets the Header margin.The Header margin.Gets or sets the Footer margin.The Footer margin.
Gets an object to manage the print areas of the worksheet.
Gets the first row that will repeat on the top of the printed pages.
Use SetRowsToRepeatAtTop() to set the rows that will be repeated on the top of the printed pages.
Gets the last row that will repeat on the top of the printed pages.
Use SetRowsToRepeatAtTop() to set the rows that will be repeated on the top of the printed pages.
Sets the rows to repeat on the top of the printed pages.
The range of rows to repeat on the top of the printed pages.
Sets the rows to repeat on the top of the printed pages.
The first row to repeat at top.
The last row to repeat at top.
Gets the first column to repeat on the left of the printed pages.The first column to repeat on the left of the printed pages.Gets the last column to repeat on the left of the printed pages.The last column to repeat on the left of the printed pages.
Sets the rows to repeat on the left of the printed pages.
The first column to repeat at left.
The last column to repeat at left.
Sets the rows to repeat on the left of the printed pages.
The range of rows to repeat on the left of the printed pages.
Gets or sets the page orientation for printing.The page orientation.
Gets or sets the number of pages wide (horizontal) the worksheet will be printed on.
If you don't specify the PagesTall, Excel will adjust that valuebased on the contents of the worksheet and the PagesWide number.Setting this value will override the Scale value.
Gets or sets the number of pages tall (vertical) the worksheet will be printed on.
If you don't specify the PagesWide, Excel will adjust that valuebased on the contents of the worksheet and the PagesTall number.Setting this value will override the Scale value.
Gets or sets the scale at which the worksheet will be printed.
The worksheet will be printed on as many pages as necessary to print at the given scale.Setting this value will override the PagesWide and PagesTall values.
Gets or sets the horizontal dpi for printing the worksheet.
Gets or sets the vertical dpi for printing the worksheet.
Gets or sets the page number that will begin the printout.
For example, the first page of your printout could be numbered page 5.
Gets or sets a value indicating whether the worksheet will be centered on the page horizontally.
true if the worksheet will be centered on the page horizontally; otherwise, false.
Gets or sets a value indicating whether the worksheet will be centered on the page vertically.
true if the worksheet will be centered on the page vertically; otherwise, false.
Sets the scale at which the worksheet will be printed. This is equivalent to setting the Scale property.
The worksheet will be printed on as many pages as necessary to print at the given scale.Setting this value will override the PagesWide and PagesTall values.
The scale at which the worksheet will be printed.
Gets or sets the number of pages the worksheet will be printed on.
This is equivalent to setting both PagesWide and PagesTall properties.Setting this value will override the Scale value.
The pages wide.
The pages tall.
Gets or sets the size of the paper to print the worksheet.
Gets an object to work with the page margins.
Gets an object to work with the page headers.
Gets an object to work with the page footers.
Gets or sets a value indicating whether Excel will automatically adjust the font size to the scale of the worksheet.
true if Excel will automatically adjust the font size to the scale of the worksheet; otherwise, false.
Gets or sets a value indicating whether the header and footer margins are aligned with the left and right margins of the worksheet.
true if the header and footer margins are aligned with the left and right margins of the worksheet; otherwise, false.
Gets or sets a value indicating whether the gridlines will be printed.
true if the gridlines will be printed; otherwise, false.
Gets or sets a value indicating whether to show row numbers and column letters/numbers.
true to show row numbers and column letters/numbers; otherwise, false.
Gets or sets a value indicating whether the worksheet will be printed in black and white.
true if the worksheet will be printed in black and white; otherwise, false.
Gets or sets a value indicating whether the worksheet will be printed in draft quality.
true if the worksheet will be printed in draft quality; otherwise, false.
Gets or sets the page order for printing.
Gets or sets how the comments will be printed.
Gets a list with the row breaks (for printing).
Gets a list with the column breaks (for printing).
Adds a horizontal page break after the given row.
The row to insert the break.
Adds a vertical page break after the given column.
The column to insert the break.
Gets or sets how error values will be printed.
Removes the print areas from the worksheet.Adds a range to the print areas.
The first cell row.
The first cell column.
The last cell row.
The last cell column.
Adds a range to the print areas.
The range address to add.
Adds a range to the print areas.
The first cell address.
The last cell address.
Adds a range to the print areas.
The first cell address.
The last cell address.
Implementation of QuadTree adapted to Excel worksheet specifics. Differences with the classic implementation
are that the topmost level is split to 128 square parts (2 columns of 64 blocks, each 8192*8192 cells) and that splitting
the quadrant onto 4 smaller quadrants does not depend on the number of items in this quadrant. When the range is added to the
QuadTree it is placed on the bottommost level where it fits to a single quadrant. That means, row-wide and column-wide ranges
are always placed at the level 0, and the smaller the range is the deeper it goes down the tree. This approach eliminates
the need of transferring ranges between levels.
Smaller quadrants which the current one is split to. Is NULL until ranges are added to child quadrants.
The level of current quadrant. Top most has level 0, child quadrants has levels (Level + 1).
Minimum column included in this quadrant.
Minimum row included in this quadrant.
Maximum column included in this quadrant.
Maximum row included in this quadrant.
Collection of ranges belonging to this quadrant (does not include ranges from child quadrants).
The number of current quadrant by horizontal axis.
The number of current quadrant by vertical axis.
Add a range to the quadrant or to one of the child quadrants (recursively).
True, if range was successfully added, false if it has been added before.
Get all ranges from the quadrant and all child quadrants (recursively).
Get all ranges from the quadrant and all child quadrants (recursively) that intersect the specified address.
Get all ranges from the quadrant and all child quadrants (recursively) that cover the specified address.
Remove the range from the quadrant or from child quadrants (recursively).
True if the range was removed, false if it does not exist in the QuadTree.
Remove all the ranges matching specified criteria from the quadrant and its child quadrants (recursively).
Don't use it for searching intersections as it would be much less efficient than .
Maximum depth of the QuadTree. Value 10 corresponds to the smallest quadrants having size 16*16 cells.
Collection of ranges belonging to the current quadrant (that cannot fit into child quadrants).
Add a range to the collection of quadrant's own ranges.
True if the range was successfully added, false if it had been added before.
Check if the current quadrant fully covers the specified address.
Check if the current quadrant covers the specified address.
Check if the current quadrant intersects the specified address.
Create a collection of child quadrants dividing the current one.
A generic version of
A cache of pivot data - essentially a collection of fields and their values that can be
displayed by a . Data for the cache are retrieved from
an area (a table or a range). The pivot cache data are cached, i.e.
the data in the source are not immediately updated once the data in a worksheet change.
Get names of all fields in the source, in left to right order. Every field name is unique.
The field names are case insensitive. The field names of the cached
source might differ from actual names of the columns
in the data cells.
Gets the number of unused items in shared items to allow before discarding unused items.
Shared items are distinct values of a source field values. Updating them can be expensive
and this controls, when should the cache be updated. Application-dependent attribute.
Default value is .
Will Excel refresh the cache when it opens the workbook.
Default value is false.
Should the cached values of the pivot source be saved into the workbook file?
If source data are not saved, they will have to be refreshed from the source
reference which might cause a change in the table values.
Default value is true.
Refresh data in the pivot source from the source reference data.
Sets the value to true.Sets the value to true.
A collection of pivot caches. Pivot cache
can be added from a or a .
Add a new pivot cache.
Range for which to create the pivot cache.
The pivot cache for the range.
The cache of data for the pivot table. The pivot table is created
from cached data, not up-to-date data in a worksheet.
Add a pivot table that will use the pivot cache.
Name of new pivot table.
A cell where will the pivot table be have it's left top corner.
Pivot cache to use for the pivot table.
Added pivot table.There already is a pivot table with the same name.
Get pivot table with the specified name (case insensitive).
Name of a pivot table to return.
No such pivot table found.
Helper function used during saving to calculate the indices of the filtered values
Indices of the filtered values
Adds a further limitation so the is only applied to cells in a pivot table
that are are within the field that has some values.
The pivot style is bound by the field index in a pivot table, not field value. E.g. if field values
are Jan, Feb and the predicate marks Feb (offset 1) = second field (Feb) will be highlighted.
If user later reverses order in Excel to Feb, Jan, the style would still apply to the second value - Jan.
Only cells in a pivot table under this field will be styled.
A predicate to determine which index of the field should be styled.
A pivot value field, it is basically a specification of how to determine and
format values from source to display in the pivot table.
Specifies the index to the base field when the ShowDataAs calculation is in use.
Instead of base item, previous or next value can be used through Used only if the value should be showed Show Values As in the value field settings.
The name of the column of the relevant base field.
Show values as a percent of a specific value of a different field, e.g. as a % of units sold from Q1 (quarts is a base field and Q1 is a base item).
The value of a base item to calculate a value to show in the pivot table. The base item is selected from values of a base field.
Used only if the value should be showed Show Values As in the value field settings.
The value of the referenced base field item.
Show values as a percent of a specific value of a different field, e.g. as a % of units sold from Q1 (quarts is a base field and Q1 is a base item).
An interface for fluent configuration of how to show ,
when the value should be displayed not as a value itself, but in relation to another
value (e.g. percentage difference in relation to different value).
The base item value for calculation will be the value of the previous row of base
field, depending on the order of base field values in a row/column. If there isn't
a previous value, the same value will be used.
This only affects display how are values displayed, not the values themselves.
Example:
We have a table of sales and a pivot table, where sales are summed per month.
The months are sorted from Jan to Dec. To display a percentage increase of
sales per month (the base value is previous month):
IXLPivotValue sales;
sales.SetSummaryFormula(XLPivotSummary.Sum).ShowAsPercentageDifferenceFrom("Month").AndPrevious();
Pivot cache definition id from the file.
Try to get a field index for a field name.
Name of the field.
The found index, start at 0.
True if source contains the field.
Specifies the number of unused items to allow in a
before discarding unused items.
The threshold is set automatically based on the number of items.
Default behavior.
When even one item is unused.
When all shared items of a filed are unused.
Gets or sets the elements that are allowed to be edited by the user, i.e. those that are not protected.The allowed elements.
Adds the specified element to the list of allowed elements.
Beware that if you pass through "None", this will have no effect.
The element to add
Set to true to allow the element or false to disallow the element
The current protection instanceAllows all elements to be edited.Allows no elements to be edited. Protects all elements.Copies all the protection settings from a different instance.
The protectable.
Removes the element to the list of allowed elements.
Beware that if you pass through "None", this will have no effect.
The element to remove
The current protection instanceProtects this instance without a password.
The algorithm.
Protects this instance using the specified password and password hash algorithm.
The password.
The algorithm.
Unprotects this instance without a password.Unprotects this instance using the specified password.
The password.
Gets the algorithm used to hash the password.The algorithm.Gets a value indicating whether this instance is protected with a password.true if this instance is password protected; otherwise, false.
Gets a value indicating whether this instance is protected, either with or without a password.true if this instance is protected; otherwise, false.
Protects this instance without a password.Protects this instance without a password.Protects this instance with the specified password, password hash algorithm and set elements that the user is allowed to change.
The algorithm.
The allowed elements.
Protects this instance using the specified password and password hash algorithm.
The password.
The algorithm.
Protects this instance with the specified password, password hash algorithm and set elements that the user is allowed to change.
The password.
The algorithm.
The allowed elements.
Unprotects this instance without a password.Unprotects this instance using the specified password.
The password.
Gets a value indicating whether this instance is protected with a password.true if this instance is password protected; otherwise, false.
Gets a value indicating whether this instance is protected, either with or without a password.true if this instance is protected; otherwise, false.
Protects this instance without a password.Protects this instance using the specified password and password hash algorithm.
The password.
The algorithm.
Unprotects this instance without a password.Unprotects this instance using the specified password.
The password.
The Windows option is available only in Excel 2007, Excel 2010, Excel for Mac 2011, and Excel 2016 for Mac. Select the Windows option if you want to prevent users from moving, resizing, or closing the workbook window, or hide/unhide windows.
Interface for the engine aimed to speed-up the search for the range intersections.
Implementation of internally using QuadTree.
The minimum number of ranges to be included into a QuadTree. Until it is reached the ranges
are added into a simple list to minimize the overhead of searching intersections on small collections.
A collection of ranges used before the QuadTree is initialized (until
is reached.
Generic version of .
A very lightweight interface for entities that have an address as
a rectangular range.
Gets an object with the boundaries of this range.
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.The default scope for the named range is Workbook.
Name of the range.
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
Name of the range.
The scope for the named range.
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
Name of the range.
The scope for the named range.
The comments for the named range.
Sets the cells' value.
If the object is an IEnumerable ClosedXML will copy the collection's data into a table starting from each cell.If the object is a range ClosedXML will copy the range starting from each cell.Setting the value to an object (not IEnumerable/range) will call the object's ToString() method.ClosedXML will try to translate it to the corresponding type, if it can't then the value will be left as a string.
The object containing the value(s) to set.
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
if set to true will return all cells with a value or a style different than the default.
Clears the contents of these ranges.
Specify what you want to clear.
A behavior of extra outside cells for transpose operation. The option
is meaningful only for transposition of non-squared ranges, because
squared ranges can always be transposed without effecting outside cells.
Shift cells of the smaller side to its direction so
there is a space to transpose other side (e.g. if A1:C5
range is transposed, move D1:XFD5 are moved 2 columns
to the right).
Data of the cells are replaced by the transposed cells.
Gets the cell at the specified row and column.
The cell address is relative to the parent range.
The cell's row.
The cell's column.
Gets the cell at the specified address.The cell address is relative to the parent range.
The cell address in the parent range.
Gets the cell at the specified row and column.
The cell address is relative to the parent range.
The cell's row.
The cell's column.
Gets the cell at the specified address.The cell address is relative to the parent range.
The cell address in the parent range.
Gets the specified column of the range.
1-based column number relative to the first column of this range.
The relevant column
Gets the specified column of the range.
Column letter.
Gets the first column of the range.
Gets the first non-empty column of the range that contains a cell with a value.
The options to determine whether a cell is used.
The predicate to choose cells.
Gets the last column of the range.
Gets the last non-empty column of the range that contains a cell with a value.
The options to determine whether a cell is used.
The predicate to choose cells.
Gets a collection of all columns in this range.
Gets a collection of the specified columns in this range.
The first column to return. 1-based column number relative to the first column of this range.
The last column to return. 1-based column number relative to the first column of this range.
Gets a collection of the specified columns in this range.
The first column to return.
The last column to return.
The relevant columns
Gets a collection of the specified columns in this range, separated by commas.
e.g. Columns("G:H"), Columns("10:11,13:14"), Columns("P:Q,S:T"), Columns("V")
The columns to return.
Returns the first row that matches the given predicate
Returns the first row that matches the given predicate
Gets the first row of the range.
Gets the first non-empty row of the range that contains a cell with a value.
The options to determine whether a cell is used.
The predicate to choose cells.
Gets the last row of the range.
Gets the last non-empty row of the range that contains a cell with a value.
The options to determine whether a cell is used.
The predicate to choose cells.
Gets the specified row of the range.
1-based row number relative to the first row of this range.
The relevant row
Gets a collection of the specified rows in this range.
The first row to return. 1-based row number relative to the first row of this range.
The last row to return. 1-based row number relative to the first row of this range.
Gets a collection of the specified rows in this range, separated by commas.
e.g. Rows("4:5"), Rows("7:8,10:11"), Rows("13")
The rows to return.
Returns the specified range.
The range boundaries.
Returns the specified range.e.g. Range("A1"), Range("A1:C2")
The range boundaries.
Returns the specified range.
The first cell in the range.
The last cell in the range.
Returns the specified range.
The first cell address in the range.
The last cell address in the range.
Returns the specified range.
The first cell address in the range.
The last cell address in the range.
Returns a collection of ranges, separated by commas.e.g. Ranges("A1"), Ranges("A1:C2"), Ranges("A1:B2,D1:D4")
The ranges to return.
Returns the specified range.
The first cell's row of the range to return.
The first cell's column of the range to return.
The last cell's row of the range to return.
The last cell's column of the range to return.
.Gets the number of rows in this range.Gets the number of columns in this range.
Inserts X number of columns to the right of this range.
All cells to the right of this range will be shifted X number of columns.
Number of columns to insert.
Inserts X number of columns to the left of this range.
This range and all cells to the right of this range will be shifted X number of columns.
Number of columns to insert.
Inserts X number of rows on top of this range.
This range and all cells below this range will be shifted X number of rows.
Number of rows to insert.
Inserts X number of rows below this range.
All cells below this range will be shifted X number of rows.
Number of rows to insert.
Deletes this range and shifts the surrounding cells accordingly.
How to shift the surrounding cells.
Transposes the contents and styles of all cells in this range.
How to handle the surrounding cells when transposing the range.
Use this range as a table, but do not add it to the Tables list
NOTES:
The AsTable method will use the first row of the range as a header row.
If this range contains only one row, then an empty data row will be inserted into the returned table.
Use this range as a table with the passed name, but do not add it to the Tables list
Table name to be used.
NOTES:
The AsTable method will use the first row of the range as a header row.
If this range contains only one row, then an empty data row will be inserted into the returned table.
Clears the contents of this range.
Specify what you want to clear.
Gets the number of columns in the area covered by the range address.
Gets or sets the first address in the range.
The first address.
Gets or sets a value indicating whether this range is valid.
true if this instance is valid; otherwise, false.
Gets or sets the last address in the range.
The last address.
Gets the number of cells in the area covered by the range address.
Gets the number of rows in the area covered by the range address.
Allocates the current range address in the internal range repository and returns itRange of the address or null, if the range is not a valid address.
Returns the intersection of this range address with another range address on the same worksheet.
The other range address.
The intersection's range address
Determines whether range address spans the entire column.
true if is entire column; otherwise, false.
Determines whether range address spans the entire row.
true if is entire row; otherwise, false.
Determines whether the range address spans the entire worksheet.
true if is entire sheet; otherwise, false.
Returns a range address so that its offset from the target base address is equal to the offset of the current range address to the source base address.
For example, if the current range address is D4:E4, the source base address is A1:C3, then the relative address to the target base address B10:D13 is E14:F14
The source base range address.
The target base range address.
The relative range
Sets a value to every cell in this range.
Setter will clear a formula, if the cell contains a formula.
If the value is a text that starts with a single quote, setter will prefix the value with a single quote through
in Excel too and the value of cell is set to to non-quoted text.
Sets the cells' formula with A1 references.
The formula with A1 references.
Create an array formula for all cells in the range.
When the range overlaps with a table, pivot table, merged cells or partially overlaps another array formula.
Sets the cells' formula with R1C1 references.
The formula with R1C1 references.
Gets or sets a value indicating whether this cell's text should be shared or not.
If false the cell's text will not be shared and stored as an inline value.
Returns the collection of cells.
Returns the collection of cells that have a value. Formats are ignored.
Returns the collection of cells that have a value.
The options to determine whether a cell is used.
Searches the cells' contents for a given piece of text
The search text.
The compare options.
if set to true search formulae instead of cell values.
Returns the first cell of this range.
Returns the first non-empty cell with a value of this range. Formats are ignored.
The cell's address is going to be ([First Row with a value], [First Column with a value])
Returns the first non-empty cell with a value of this range.
The options to determine whether a cell is used.
Returns the first non-empty cell with a value of this range.
The options to determine whether a cell is used.
The predicate used to choose cells
Returns the last cell of this range.
Returns the last non-empty cell with a value of this range. Formats are ignored.
The cell's address is going to be ([Last Row with a value], [Last Column with a value])
Returns the last non-empty cell with a value of this range.
The options to determine whether a cell is used.
Determines whether this range contains the specified range (completely).
For partial matches use the range.Intersects method.
The range address.
true if this range contains the specified range; otherwise, false.
Determines whether this range contains the specified range (completely).
For partial matches use the range.Intersects method.
The range to match.
true if this range contains the specified range; otherwise, false.
Determines whether this range intersects the specified range.
For whole matches use the range.Contains method.
The range address.
true if this range intersects the specified range; otherwise, false.
Determines whether this range contains the specified range.
For whole matches use the range.Contains method.
The range to match.
true if this range intersects the specified range; otherwise, false.
Unmerges this range.
Merges this range. Only the top-left cell will have a value, other values will be blank.
Creates a named range out of this range.
If the named range exists, it will add this range to that named range.The default scope for the named range is Workbook.
Name of the range.
Creates a named range out of this range.
If the named range exists, it will add this range to that named range.
Name of the range.
The scope for the named range.
Creates a named range out of this range.
If the named range exists, it will add this range to that named range.
Name of the range.
The scope for the named range.
The comments for the named range.
Clears the contents of this range.
Specify what you want to clear.
Deletes the cell comments from this range.
Set value to all cells in the range.
Converts this object to a range.
Determines whether range address spans the entire column.
true if is entire column; otherwise, false.
Determines whether range address spans the entire row.
true if is entire row; otherwise, false.
Determines whether the range address spans the entire worksheet.
true if is entire sheet; otherwise, false.
Returns a data validation rule assigned to the range, if any, or creates a new instance of data validation rule if no rule exists.
Creates a new data validation rule for the range, replacing the existing one.
Grows this the current range by one cell to each side
Grows this the current range by the specified number of cells to each side.
The grow count.
Shrinks this current range by one cell.
Shrinks the current range by the specified number of cells from each side.
The shrink count.
Returns the intersection of this range with another range on the same worksheet.
The other range.
Predicate applied to this range's cells.
Predicate applied to the other range's cells.
The range address of the intersection
Returns the set of cells surrounding the current range.
The predicate to apply on the resulting set of cells.
Calculates the union of two ranges on the same worksheet.
The other range.
Predicate applied to this range's cells.
Predicate applied to the other range's cells.
The union
Returns all cells in the current range that are not in the other range.
The other range.
Predicate applied to this range's cells.
Predicate applied to the other range's cells.
Returns a range so that its offset from the target base range is equal to the offset of the current range to the source base range.
For example, if the current range is D4:E4, the source base range is A1:C3, then the relative range to the target base range B10:D13 is E14:F14
The source base range.
The target base range.
The relative range
Gets the cell in the specified row.
The cell's row.
Returns the specified group of cells, separated by commas.
e.g. Cells("1"), Cells("1:5"), Cells("1:2,4:5")
The column cells to return.
Returns the specified group of cells.
The first row in the group of cells to return.
The last row in the group of cells to return.
Inserts X number of columns to the right of this range.
All cells to the right of this range will be shifted X number of columns.
Number of columns to insert.
Inserts X number of columns to the left of this range.
This range and all cells to the right of this range will be shifted X number of columns.
Number of columns to insert.
Inserts X number of cells on top of this column.
This column and all cells below it will be shifted X number of rows.
Number of cells to insert.
Inserts X number of cells below this range.
All cells below this column will be shifted X number of rows.
Number of cells to insert.
Deletes this range and shifts the cells at the right.
Deletes this range and shifts the surrounding cells accordingly.
How to shift the surrounding cells.
Gets this column's number in the range
Gets this column's letter in the range
Clears the contents of this column.
Specify what you want to clear.
Adds a column range to this group.
The column range to add.
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
The options to determine whether a cell is used.
Deletes all columns and shifts the columns at the right of them accordingly.
Clears the contents of these columns.
Specify what you want to clear.
Gets the cell in the specified column.
The cell's column.
Gets the cell in the specified column.
The cell's column.
Returns the specified group of cells, separated by commas.
e.g. Cells("1"), Cells("1:5"), Cells("1:2,4:5")
The row's cells to return.
Returns the specified group of cells.
The first column in the group of cells to return.
The last column in the group of cells to return.
Returns the specified group of cells.
The first column in the group of cells to return.
The last column in the group of cells to return.
Inserts X number of cells to the right of this row.
All cells to the right of this row will be shifted X number of columns.
Number of cells to insert.
Inserts X number of cells to the left of this row.
This row and all cells to the right of it will be shifted X number of columns.
Number of cells to insert.
Inserts X number of rows on top of this row.
This row and all cells below it will be shifted X number of rows.
Number of rows to insert.
Inserts X number of rows below this row.
All cells below this row will be shifted X number of rows.
Number of rows to insert.
Deletes this range and shifts the cells below.
Deletes this range and shifts the surrounding cells accordingly.
How to shift the surrounding cells.
Gets this row's number in the range
Clears the contents of this row.
Specify what you want to clear.
Adds a row range to this group.
The row range to add.
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
The options to determine whether a cell is used.
Deletes all rows and shifts the rows below them accordingly.
Clears the contents of these rows.
Specify what you want to clear.
Adds the specified range to this group.
The range to add to this group.
Removes the specified range from this group.
The range to remove from this group.
Removes ranges matching the criteria from the collection, optionally releasing their event handlers.
Criteria to filter ranges. Only those ranges that satisfy the criteria will be removed.
Null means the entire collection should be cleared.
Specify whether or not should removed ranges be unsubscribed from
row/column shifting events. Until ranges are unsubscribed they cannot be collected by GC.
Filter ranges from a collection that intersect the specified address. Is much more efficient
that using Linq expression .Where().
Filter ranges from a collection that intersect the specified address. Is much more efficient
that using Linq expression .Where().
Filter ranges from a collection that intersect the specified cell. Is much more efficient
that using Linq expression .Where().
Creates a new data validation rule for the ranges collection, replacing the existing ones.
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.The default scope for the named range is Workbook.
Name of the range.
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
Name of the range.
The scope for the named range.
Creates a named range out of these ranges.
If the named range exists, it will add these ranges to that named range.
Name of the range.
The scope for the named range.
The comments for the named range.
Sets the cells' value.
Setter will clear a formula, if the cell contains a formula.
If the value is a text that starts with a single quote, setter will prefix the value with a single quote through
in Excel too and the value of cell is set to to non-quoted text.
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
The options to determine whether a cell is used.
Clears the contents of these ranges.
Specify what you want to clear.
Create a new collection of ranges which are consolidated version of source ranges.
Lead a range address to a normal form - when points to the top-left address and
points to the bottom-right address.
Does this range contains whole another range?
Return the collection of cell values not initializing empty cells.
The direct constructor should only be used in .
Engine for ranges consolidation. Supports IXLRanges including ranges from either one or multiple worksheets.
Class representing the area covering ranges to be consolidated as a set of bit matrices. Does all the dirty job
of ranges consolidation.
Constructor.
Current worksheet.
Ranges to be consolidated. They are expected to belong to the current worksheet, no check is performed.
Get consolidated ranges equivalent to the input ones.
Indicates whether the current object is equal to another object of the same type.true if the current object is equal to the parameter; otherwise, false.
An object to compare with this object.
Indicates whether this instance and a specified object are equal.true if and this instance are the same type and represent the same value; otherwise, false.
Another object to compare to.
Returns the hash code for this instance.A 32-bit signed integer that is the hash code for this instance.
The direct constructor should only be used in .
Normally, XLRanges collection includes ranges from a single worksheet, but not necessarily.
Removes ranges matching the criteria from the collection, optionally releasing their event handlers.
Criteria to filter ranges. Only those ranges that satisfy the criteria will be removed.
Null means the entire collection should be cleared.
Specify whether or not should removed ranges be unsubscribed from
row/column shifting events. Until ranges are unsubscribed they cannot be collected by GC.
Filter ranges from a collection that intersect the specified address. Is much more efficient
that using Linq expression .Where().
Filter ranges from a collection that intersect the specified address. Is much more efficient
that using Linq expression .Where().
Copy the text and formatting from the original text.
Original to copy from.
This text.
Determines a theme font scheme the rich string belongs to. If the string belongs
to a scheme and user changes theme in Excel, the font of the string will switch
to the new theme font.
Gets or sets the height of this row.
The width of this row in points.
Clears the height for the row and defaults it to the spreadsheet row height.
Deletes this row and shifts the rows below this one accordingly.
Don't use in a loop due to poor performance. Use instead.
Gets this row's number
Inserts X number of rows below this one.
All rows below will be shifted accordingly.
The number of rows to insert.
Inserts X number of rows above this one.
This row and all below will be shifted accordingly.
The number of rows to insert.
Adjusts the height of the row based on its contents, starting from the startColumn.
The column to start calculating the row height.
Adjusts the height of the row based on its contents, starting from the startColumn and ending at endColumn.
The column to start calculating the row height.
The column to end calculating the row height.
Adjust height of the column according to the content of the cells.
Number of a first column whose content is considered.
Number of a last column whose content is considered.
Minimum height of adjusted column, in points.
Maximum height of adjusted column, in points.
Hides this row.Unhides this row.
Gets a value indicating whether this row is hidden or not.
true if this row is hidden; otherwise, false.
Gets or sets the outline level of this row.
The outline level of this row.
Adds this row to the next outline level (Increments the outline level for this row by 1).
Adds this row to the next outline level (Increments the outline level for this row by 1).
If set to true the row will be shown collapsed.
Sets outline level for this row.
The outline level.
Sets outline level for this row.
The outline level.
If set to true the row will be shown collapsed.
Adds this row to the previous outline level (decrements the outline level for this row by 1).
Adds this row to the previous outline level (decrements the outline level for this row by 1).
If set to true it will remove this row from all outline levels.
Show this row as collapsed.
Gets the cell in the specified column.
The cell's column.
Gets the cell in the specified column.
The cell's column.
Returns the specified group of cells, separated by commas.
e.g. Cells("1"), Cells("1:5"), Cells("1,3:5")
The row's cells to return.
Returns the specified group of cells.
The first column in the group of cells to return.
The last column in the group of cells to return.
Returns the specified group of cells.
The first column in the group of cells to return.
The last column in the group of cells to return.
Expands this row (if it's collapsed).
Adds a horizontal page break after this row.
Clears the contents of this row.
Specify what you want to clear.
Sets the height of all rows.
The height of all rows.
Deletes all rows and shifts the rows below them accordingly.
Adjusts the height of all rows based on its contents.
Adjusts the height of all rows based on its contents, starting from the startColumn.
The column to start calculating the row height.
Adjusts the height of all rows based on its contents, starting from the startColumn and ending at endColumn.
The column to start calculating the row height.
The column to end calculating the row height.
Hides all rows.
Unhides all rows.
Increments the outline level of all rows by 1.
Increments the outline level of all rows by 1.
If set to true the rows will be shown collapsed.
Sets outline level for all rows.
The outline level.
Sets outline level for all rows.
The outline level.
If set to true the rows will be shown collapsed.
Decrements the outline level of all rows by 1.
Decrements the outline level of all rows by 1.
If set to true it will remove the rows from all outline levels.
Show all rows as collapsed.
Expands all rows (if they're collapsed).
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
The options to determine whether a cell is used.
Adds a horizontal page break after these rows.
Clears the contents of these rows.
Specify what you want to clear.
Don't use directly, use properties.
The direct constructor should only be used in .
Distance in pixels from the bottom of the cells in the current row to the typographical
baseline of the cell content if, hypothetically, the zoom level for the sheet containing
this row is 100 percent and the cell has bottom-alignment formatting.
If the attribute is set, it sets customHeight to true even if the customHeight is explicitly
set to false. Custom height means no auto-sizing by Excel on load, so if row has this
attribute, it stops Excel from auto-sizing the height of a row to fit the content on load.
Should cells in the row display phonetic? This doesn't actually affect whether the phonetic are
shown in the row, that depends entirely on the property
of a cell. This property determines whether a new cell in the row will have it's phonetic turned on
(and also the state of the "Show or hide phonetic" in Excel when whole row is selected).
Default is false.
Does row have an individual height or is it derived from the worksheet ?
Flag enum to save space, instead of wasting byte for each flag.
Create a new instance of .
If worksheet is specified it means that the created instance represents
all rows on a worksheet so changing its height will affect all rows.
Default style to use when initializing child entries.
A predefined enumerator of to support lazy initialization.
Evaluate a cells with a formula and save the calculated value along with the formula.
True - formulas are evaluated and the calculated values are saved to the file.
If evaluation of a formula throws an exception, value is not saved but file is still saved.
False (default) - formulas are not evaluated and the formula cells don't have their values saved to the file.
Gets or sets the filter privacy flag. Set to null to leave the current property in saved workbook unchanged
Create a new sparkline
The sparkline group to add the sparkline to
The cell to place the sparkline in
The range the sparkline gets data from
The worksheet this sparkline group is associated with
Add a new sparkline group copied from an existing sparkline group to the specified worksheet
The worksheet the sparkline group is being added to
The sparkline group to copy from
The new sparkline group added
Add a new sparkline group copied from an existing sparkline group to the specified worksheet
The new sparkline group added
Add a new sparkline group copied from an existing sparkline group to the specified worksheet
The new sparkline group added
Add a new sparkline group copied from an existing sparkline group to the specified worksheet
The new sparkline group added
Add a sparkline to the group.
The cell to add sparklines to. If it already contains a sparkline
it will be replaced.
The range the sparkline gets data from
A newly created sparkline.
Copy the details from a specified sparkline group
The sparkline group to copy from
Copy this sparkline group to the specified worksheet
The worksheet to copy this sparkline group to
Remove all sparklines in the specified cell from this group
The cell to remove sparklines from
Remove the sparkline from this group
Remove all sparklines from this group
Add a new sparkline group to the specified worksheet
The worksheet the sparkline group is being added to
The new sparkline group added
Add empty sparkline group.
Add the sparkline group to the collection.
The sparkline group to add to the collection
The same sparkline group
Add a copy of an existing sparkline group to the specified worksheet
The sparkline group to copy
The worksheet the sparkline group is being added to
The new sparkline group added
Copy this sparkline group to a different worksheet
The worksheet to copy the sparkline group to
Search for the first sparkline that is in the specified cell
The cell to find the sparkline for
The sparkline in the cell or null if no sparklines are found
Find all sparklines located in a given range
The range to search
The sparkline in the cell or null if no sparklines are found
Remove all sparklines in the specified cell
The cell to remove sparklines from
Remove the sparkline group from the worksheet
The sparkline group to remove
Remove the sparkline from the worksheet
The sparkline to remove
Remove all sparkline groups and their contents from the worksheet.
Shift address of all sparklines to reflect inserted columns before a range.
Range before which will the columns be inserted. Has same worksheet.
How many columns, can be positive or negative number.
Shift address of all sparklines to reflect inserted rows before a range.
Range before which will the rows be inserted. Has same worksheet.
How many rows, can be positive or negative number.
Returns a value that indicates whether two objects have different values.
The first value to compare.
The second value to compare.
true if and are not equal; otherwise, false.Returns a value that indicates whether the values of two objects are equal.
The first value to compare.
The second value to compare.
true if the and parameters have the same value; otherwise, false.Indicates whether the current object is equal to another object of the same type.
An object to compare with this object.
true if the current object is equal to the other parameter; otherwise, false.Determines whether the specified object is equal to the current object.
The object to compare with the current object.
true if the specified object is equal to the current object; otherwise, false.Serves as the default hash function.A hash code for the current object.
VML palette entries from MS-OI29500. Excel uses Windows system color scheme to determine the actual colors of a palette
entry, but we have no way to get them. Win10 doesn't even have a tool, use Classic Color Panel. We will use the default
values that are default on Windows.
Create a color from RBG hexa number. Alpha will be always set to full opacity.
Parse VML ST_ColorType type from ECMA-376, Part 4 ยง20.1.2.3.
Gets or sets the cell's horizontal alignment.
Gets or sets the cell's vertical alignment.
Gets or sets the cell's text indentation.
Gets or sets whether the cell's last line is justified or not.
Gets or sets the cell's reading order.
Gets or sets the cell's relative indent.
Gets or sets whether the cell's font size should decrease to fit the contents.
Gets or sets the cell's text rotation in degrees. Allowed values are -90
(text is rotated clockwise) to 90 (text is rotated counterclockwise) and
255 for vertical layout of a text.
Gets or sets whether the cell's text should wrap if it doesn't fit.
Gets or sets whether the cell's text should be displayed from to to bottom
(as opposed to the normal left to right).
ASCII character set.
System default character set.
Symbol character set.
Characters used by Macintosh.
Japanese character set.
Korean character set.
Another common spelling of the Korean character set.
Korean character set.
Chinese character set used in mainland China.
Chinese character set used mostly in Hong Kong SAR and Taiwan.
Greek character set.
Turkish character set.
Vietnamese character set.
Hebrew character set.
Arabic character set.
Baltic character set.
Russian character set.
Thai character set.
Eastern European character set.
Extended ASCII character set used with disk operating system (DOS) and some Microsoft Windows fonts.
A font theme scheme. Theme has categories of fonts and when the theme changes, texts that are associated with
the particular theme scheme are switched to a font of a new theme.
Not a part of theme scheme.
A major font of a theme, generally used for headings.
A minor font of a theme, generally used to body and paragraphs.
Should the text values of a cell saved to the file be prefixed by a quote (') character?
Has no effect if cell values is not a . Doesn't affect values during runtime,
text values are returned without quote.
Immutable style
Create an instance of XLAlignment initializing it with the specified value.
Style to attach the new instance to.
Style value to use.
Create an instance of XLBorder initializing it with the specified value.
Container the border is applied to.
Style to attach the new instance to.
Style value to use.
Helper class that remembers outside border state before editing (in constructor) and restore afterwards (on disposing).
It presumes that size of the range does not change during the editing, else it will fail.
Create an instance of XLFill initializing it with the specified value.
Style to attach the new instance to.
Style value to use.
Create an instance of XLFont initializing it with the specified value.
Style to attach the new instance to.
Style value to use.
Create an instance of XLNumberFormat initializing it with the specified value.
Style to attach the new instance to.
Style value to use.
General number format.
Id of the number format. Every workbook has
built-int formats that start at 0 (General format). The built-int formats are
not explicitly written and might differ depending on culture. Custom number formats
have a valid and the id is -1.
Reference point of date/number formats available.
See more at: https://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.numberingformat.aspx
General
General
0
0.00
#,##0
#,##0.00
0%
0.00%
0.00E+00
# ?/?
# ??/??
#,##0 ,(#,##0)
#,##0 ,[Red](#,##0)
#,##0.00,(#,##0.00)
#,##0.00,[Red](#,##0.00)
##0.0E+0
@
General
d/m/yyyy
d-mmm-yy
d-mmm
mmm-yy
h:mm tt
h:mm:ss tt
H:mm
H:mm:ss
m/d/yyyy H:mm
mm:ss
[h]:mm:ss
mmss.0
@
Create an instance of XLProtection initializing it with the specified value.
Style to attach the new instance to.
Style value to use.
To initialize XLStyle.Default only
Base class for any workbook element that has or may have a style.
Read-only style property.
Editable style of the workbook element. Modification of this property DOES affect styles of child objects as well - they will
be changed accordingly. Accessing this property causes a new instance generated so use this property
with caution. If you need only _read_ the style consider using property instead.
Editable style of the workbook element. Modification of this property DOES NOT affect styles of child objects.
Accessing this property causes a new instance generated so use this property with caution. If you need
only _read_ the style consider using property instead.
Get a collection of stylized entities which current entity's style changes should be propagated to.
Apply specified style to the container.
Style to apply.
Whether or not propagate the style to inner ranges.
Change the name of a table. Structural references to the table are not updated.
If the new table name is already used by other table in the sheet.
Clears the contents of this table.
Specify what you want to clear.
Appends the IEnumerable data elements and returns the range of the new rows.
The IEnumerable data.
if set to true propagate extra columns' values and formulas.
The range of the new rows.
Appends the IEnumerable data elements and returns the range of the new rows.
The IEnumerable data.
if set to true the data will be transposed before inserting.
if set to true propagate extra columns' values and formulas.
The range of the new rows.
Appends the data of a data table and returns the range of the new rows.
The data table.
if set to true propagate extra columns' values and formulas.
The range of the new rows.
Appends the IEnumerable data elements and returns the range of the new rows.
The table data.
if set to true propagate extra columns' values and formulas.
The range of the new rows.
Replaces the IEnumerable data elements and returns the table's data range.
The IEnumerable data.
if set to true propagate extra columns' values and formulas.
The table's data range.
Replaces the IEnumerable data elements and returns the table's data range.
The IEnumerable data.
if set to true the data will be transposed before inserting.
if set to true propagate extra columns' values and formulas.
The table's data range.
Replaces the data from the records of a data table and returns the table's data range.
The data table.
if set to true propagate extra columns' values and formulas.
The table's data range.
Replaces the IEnumerable data elements as a table and the table's data range.
The table data.
if set to true propagate extra columns' values and formulas.
The table's data range.
Resizes the table to the specified range address.
The new table range.
Resizes the table to the specified range address.
The range boundaries.
Resizes the table to the specified range address.
The range boundaries.
Resizes the table to the specified range.
The first cell in the range.
The last cell in the range.
Resizes the table to the specified range.
The first cell address in the worksheet.
The last cell address in the worksheet.
Resizes the table to the specified range.
The first cell address in the worksheet.
The last cell address in the worksheet.
Resizes the table to the specified range.
The first cell's row of the range to return.
The first cell's column of the range to return.
The last cell's row of the range to return.
The last cell's column of the range to return.
Converts the table to an enumerable of dynamic objects
Converts the table to a standard .NET System.Data.DataTable
Gets the corresponding column for this table field.
Includes the header and footer cells
The column.
Gets the collection of data cells for this field
Excludes the header and footer cells
The data cells
Gets the footer cell for the table field.
The footer cell. null, if the table
doesn't have set .
Gets the header cell for the table field.
The header cell.null, if the table
doesn't have set .
Gets the index of the column (0-based).
The index.
Gets or sets the name/header of this table field.
The corresponding header cell's value will change if you set this.
The name.
Gets the underlying table for this table field.
Gets or sets the totals row formula in A1 format.
The totals row formula a1.
Gets or sets the totals row formula in R1C1 format.
The totals row formula r1 c1.
Gets or sets the totals row function.
The totals row function.
Gets or sets the totals row label (the leftmost cell in the totals row).
The totals row label.
If the totals row is not displayed for the table.
Deletes this table field from the table.
Determines whether all cells this table field have a consistent data type.
Determines whether all cells this table field have a consistent formula.
Determines whether all cells this table field have a consistent style.
Rows the specified row.
1-based row number relative to the first row of this range.
Returns a subset of the rows
The first row to return. 1-based row number relative to the first row of this range.
The last row to return. 1-based row number relative to the first row of this range.
Clears the contents of this row.
Specify what you want to clear.
Adds a table row to this group.
The row table to add.
Returns the collection of cells.
Returns the collection of cells that have a value.
Returns the collection of cells that have a value.
The options to determine whether a cell is used.
Clears the contents of these rows.
Specify what you want to clear.
Clears the contents of these tables.
Specify what you want to clear.
Generate a non conflicting table name for the workbook
Workbook to generate name for
"Base Table Name
Name for the table
The direct constructor should only be used in .
A value of a single cell. It contains a value a specific .
Structure provides following group of methods:
Is* properties to check type (, ...)Get* methods that return the stored value or throw for incorrect type.Explicit operators to convert XLCellValue to a concrete type. It is an equivalent of Get* methods.TryConvert methods to try to get value of a specific type, even if the value is of a different type.
Type of the value.
Is the type of value Blank?
Is the type of value ?
Is the type of value ?
Is the type of value ?
Is the type of value ?
Is the type of value ?
Is the type of value ?
Is the value or or .
Creates an from an . If the type of the object has an implicit conversion operator then it is used.
Otherwise, the method is used to convert the provided object to a string.
The following types and their nullable counterparts are supported without requiring to be converted to a string:
The object to convert.
An object that supplies culture-specific formatting information.
An representation of the object.
If the value is of type ,
return , otherwise throw .
If the value is of type ,
return logical, otherwise throw .
If the value is of type ,
return number, otherwise throw .
If the value is of type ,
return text, otherwise throw .
If the value is of type ,
return error, otherwise throw .
If the value is of type ,
return date time, otherwise throw .
If the value is of type ,
return time span, otherwise throw .
Get a number, either directly from type number or from serialized time span
or serialized date time.
If type is not or
or .
Return text representation of a value in current culture.
Return text representation of a value in the specified culture.
Get a value, if it is a .
True if value was retrieved, false otherwise.
Try to convert the value to a and return it.
Method succeeds, when value is
Type .Type and the text is empty.
Try to convert the value to a and return it.
Method succeeds, when value is
Type .Type , then the value of 0 means false and any other value is true.Type and the value is TRUE or FALSE (case insensitive). Note that calc engine
generally doesn't coerce text to logical (e.g. arithmetic operations), though it happens in most function arguments (e.g.
IF or AND).
Try to convert the value to a and return it.
Double value - return the value.Boolean value - return the 0 for TRUE and 1 for FALSE.Text value - use the VALUE semantic to convert a text to a number.DateTime value - return the serial date time number.TimeSpan value - return the serial time span value.Note that the coercion is current culture specific (e.g. decimal separators can differ).
The converted value. Result is never infinity or NaN.
The culture used to convert the value for texts.
Try to convert the value to a and return it.
Method succeeds, when value is
Type .Type and when the number is interpreted is a serial date time, it falls within the DateTime range.Type and when the number is interpreted is a serial date time, it falls within the DateTime range.
Try to convert the value to a and return it.
Method succeeds, when value is
Type .Type , the number is interpreted is a time span date time.Type and it can be parsed as a time span (accepts even hours over 24 hours).
The converted value.
The culture used to get time and decimal separators.
Analyze input string and convert value. For avoid analyzing use escape symbol '
Direct set value. If value has unsupported type - value will be stored as string returned by
Behavior for
Counter increasing at workbook data change. Serves to determine if the cell formula
has to be recalculated.
Notify that workbook data has been changed which means that cached formula values
need to be re-evaluated.
Gets an object to manipulate the worksheets.
Gets an object to manipulate this workbook's named ranges.
Gets an object to manipulate this workbook's theme.
All pivot caches in the workbook, whether they have a pivot table or not.
Gets or sets the default style for the workbook.
All new worksheets will use this style.
Gets or sets the default row height for the workbook.
All new worksheets will use this row height.
Gets or sets the default column width for the workbook.
All new worksheets will use this column width.
Gets or sets the default page options for the workbook.
All new worksheets will use these page options.
Gets or sets the default outline options for the workbook.
All new worksheets will use these outline options.
Gets or sets the workbook's properties.
Gets or sets the workbook's calculation mode.
Gets or sets the workbook's reference style.
Saves the current workbook.
Saves the current workbook and optionally performs validation
Saves the current workbook to a file.
Saves the current workbook to a file and optionally validates it.
Saves the current workbook to a stream.
Saves the current workbook to a stream and optionally validates it.
Searches the cells' contents for a given piece of text
The search text.
The compare options.
if set to true search formulae instead of cell values.
Creates a new Excel workbook.
Opens an existing workbook from a file.
The file to open.
Opens an existing workbook from a stream.
The stream to open.
Force recalculation of all cell formulas.
Evaluate a formula and return a value. Formulas with references don't work and culture used for conversion is invariant.
Calculate expected column width as a number displayed in the column in Excel from
number of characters that should fit into the width and a font.
Parses the cell value for normal or rich text
Input element should either be a shared string or inline string
The cell.
The element (either a shared string or inline string)
Loads the conditional formatting.
Populates the differential formats that are currently in the file to the SaveContext
The workbook styles part.
The context.
Check if two style are equivalent.
Style in the OpenXML format.
Style in the ClosedXML format.
Flag specifying whether or not compare the alignments of two styles.
Styles in x:cellStyleXfs section do not include alignment so we don't have to compare it in this case.
Styles in x:cellXfs section, on the opposite, do include alignments, and we must compare them.
True if two formats are equivalent, false otherwise.
A free id that can be used by the workbook to reference to a pivot cache.
The PivotCaches element in a workbook connects the parts with pivot
cache parts.
A dictionary of extra info for pivot during saving. The key is .
Add all existing rel ids present on the parts or workbook to the generator, so they are not duplicated again.
Fake address to be used everywhere the invalid address is needed.
Reference to a VML that contains notes, forms controls and so on. All such things are generally unified into
a single legacy VML file, set during load/save.
Force recalculation of all cell formulas.
Get a cell value not initializing it if it has not been initialized yet.
Row number
Column number
Get cell or null, if cell doesn't exist.
Get a range row from the shared repository or create a new one.
Address of range row.
Style to apply. If null the worksheet's style is applied.
Range row with the specified address.
Get a range column from the shared repository or create a new one.
Address of range column.
Style to apply. If null the worksheet's style is applied.
Range column with the specified address.
Round the number to the integer.
A helper method to avoid need to specify the midpoint rounding and casting each time.
Round the number to specified number of digits.
A helper method to avoid need to specify the midpoint rounding each time.
Get index of highest set bit <= to or -1 if no such bit.
Get index of lowest set bit >= to or -1 if no such bit.
Get highest set bit index or -1 if no bit is set.
Convert a string (containing code units) into code points.
Surrogate pairs of code units are joined to code points.
UTF-16 code units to convert.
Output containing code points. Must always be able to fit whole .
Number of code points in the .
Is the string a new line of any kind (widnows/unix/mac)?
Input text to check for EOL at the beginning.
Length of EOL chars.
True, if text has EOL at the beginning.
Convert a magic text to a number, where the first letter is in the highest byte of the number.
Return a string representation of a TimeSpan that can be parsed by an Excel through text-to-number coercion.
Excel can convert time span string back to a number, but only if it doesn't has days in the string, only hours.
It's an opposite of .
Common methods
Gets the column number of a given column letter.
The column letter to translate into a column number.
Gets the column letter of a given column number.
The column number to translate into a column letter.
if set to true the column letter will be restricted to the allowed range.
A backward compatible version of that returns a value
rounded to milliseconds. In .Net Core 3.0 the behavior has changed and timespan includes microseconds
as well. As a result, the value 1:12:30 saved on one machine could become 1:12:29.999999 on another.
Convert size in pixels to a size in NoC (number of characters).
Size in pixels.
Size of maximum digit width in pixels.
Size in NoC.
Convert size in NoC to size in pixels.
Size in number of characters.
Maximum digit width in pixels.
Size in pixels (not rounded).
Convert size in number of characters to pixels.
Width
Font used to determine mdw.
Workbook for dpi and graphic engine.
Width in pixels.
Convert width to pixels.
Width from the source file, not NoC that is displayed in Excel as a width.
Number of pixels.
Convert width (as a multiple of MDWs) into a NoCs (number displayed in Excel).
Width in MDWs to convert.
Font used to determine MDW.
Workbook
Width as a number of NoC.
Convert degrees to radians.
Creates a valid sheet name, which conforms to the following rules.
A sheet name:
is never null,
has minimum length of 1 and
maximum length of 31,
doesn't contain special chars: (: 0x0000 0x0003 / \ ? * ] [).
Sheet names must not begin or end with ' (apostrophe)
can be any string, will be truncated if necessary, allowed to be null
the char to replace invalid characters.
a valid string, "empty" if too short, "null" if null
Validates the name of the sheet.
The character count MUST be greater than or equal to 1 and less than or equal to 31.
The string MUST NOT contain the any of the following characters:
- 0x0000
- 0x0003
- colon (:)
- backslash(\)
- asterisk(*)
- question mark(?)
- forward slash(/)
- opening square bracket([)
- closing square bracket(])
The string MUST NOT begin or end with the single quote(') character.
Name of the sheet.
Searches for the specified item and returns the zero-based index of the first occurrence.
Index of found item, -1 if item is not found.
A reader for BMP for Windows and OS/2.
Specification:
https://www.fileformat.info/format/bmp/corion.htm
https://www.fileformat.info/format/bmp/egff.htm
https://www.fileformat.info/format/os2bmp/egff.htm
Carlito is a Calibri metric compatible font. This is a version stripped of everything but metric information
to keep the embedded file small. It is reasonably accurate for many alphabets (contains 2531 glyphs). It has
no glyph outlines, no TTF instructions, no substitutions, glyph positioning ect. It is created from Carlito
font through strip-fonts.sh script.
A font loaded font in the size . There is no benefit in having multiple allocated instances, everything is just scaled at the moment.
Max digit width as a fraction of Em square. Multiply by font size to get pt size.
Get a singleton instance of the engine that uses Microsoft Sans Serif as a fallback font.
Initialize a new instance of the engine.
A name of a font that is used when a font in a workbook is not available.
Initialize a new instance of the engine. The engine will be able to use system fonts and fonts loaded from external sources.
Useful/necessary for environments without an access to filesystem.
A stream that contains a fallback font.
Should engine try to use system fonts? If false, system fonts won't be loaded which can significantly speed up library startup.
Extra fonts that should be loaded to the engine.
Create a default graphic engine that uses only fallback font and additional fonts passed as streams.
It ignores all system fonts and that can lead to decrease of initialization time.
Font is determined by a name and style in the worksheet, but the font name must be mapped to a font file/stream.
System fonts on Windows contain hundreds of font files that have to be checked to find the correct font
file for the font name and style. That means to read hundreds of files and parse data inside them.
Even though SixLabors.Fonts does this only once (lazily too) and stores data in a static variable, it is
an overhead that can be avoided.
This factory method is useful in several scenarios:
Client side Blazor doesn't have access to any system fonts.Worksheet contains only limited number of fonts. It might be sufficient to just load few fonts we are
A stream that contains a fallback font.
Fonts that should be loaded to the engine.
Create a default graphic engine that uses only fallback font and additional fonts passed as streams.
It also uses system fonts.
A stream that contains a fallback font.
Fonts that should be loaded to the engine.
A DPI resolution.
Horizontal DPI resolution.
Vertical DPI resolution.
Metadata read of a vector EMF file. Specification: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-emf/
Read info about a GIF file. Gif file has no DPI, only pixel ratio.
Specification: https://www.w3.org/Graphics/GIF/spec-gif89a.txt
A bounding box for a glyph, in pixels.
In most cases, a glyph represents a single unicode code point. In some cases,
multiple code points are represented by a single glyph (emojis in most cases).
Although data type is float, the actual values should be whole numbers.
That best fits to Excel behavior, but there might be some cases in the future,
where values can be a floats (e.g. advance could be non-pixels aligned).
A special glyph box that indicates a line break. Dimensions are kept at 0, so it doesn't affect any calculations.
Advance width in px of a box for code point. Value should be whole number.
Size of Em square in pixels. If em is not a square, vertical dimension of
em square. Value should be whole number.
Distance in px from baseline to the bottom of the box.
Descent/height is determined by font, not by codepoints
of the glyph. Value should be whole number.
Get line width of the glyph box. It is calculated as central band with a text and
a lower and an upper bands. Central band (text) has height is em-square - descent
and the bands are descent.
An interface to abstract away graphical functionality, like reading images, fonts or to determine a width of a text.
Get the info about a picture (mostly dimensions).
Stream is at the beginning of the image.
The expected format of the image. Use for auto detection.
Unable to determine picture dimensions or format doesn't match the stream.
Get the height of a text with the font in pixels. Should be EMHeight+descent.
Get the width of a text in pixels. Do not add any padding, there can be
multiple spans of a texts with different fonts in a line.
The width of the widest 0-9 digit in pixels.
OOXML measures width of a column in multiples of widest 0-9 digit character in a normal style font.
Get font descent in pixels (positive value).
Excel is using OS/2 WinAscent/WinDescent for TrueType fonts (e.g. Calibri), not a correct font ascent/descent.
Get a glyph bounding box for a grapheme cluster.
In 99+%, grapheme cluster will be just a codepoint. Method uses grapheme instead, so it can be
future-proof signature and have less braking changes. Implementing method by adding widths of
individual code points is acceptable.
A part of a string in code points (or runes in C# terminology, not UTF-16 code units) that together
form a grapheme. Multiple unicode codepoints can form a single glyph, e.g. family grapheme is a single
glyph created from 6 codepoints (man, zero-width-join, woman, zero-width-join and a girl). A string
can be split into a grapheme clusters through .
Font used to determine size of a glyph for the grapheme cluster.
A resolution used to determine pixel size of a glyph. Font might be rendered differently at different resolutions.
Bounding box containing the glyph.
Read JFIF or EXIF.
Read info about PCX picture.
https://moddingwiki.shikadi.net/wiki/PCX_Format
A reader for baseline TIFF.
Specification: https://www.itu.int/itudoc/itu-t/com16/tiff-fx/docs/tiff6.pdf
II like Intel in ASCII.
MM like Motorola in ASCII.
Reader of dimensions for WebP image format.
Reader of Windows Meta File.
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4813e7fd-52d0-4f42-965f-228c8b7488d2
http://formats.kaitai.io/wmf/index.html
Metadata info about a picture. At least one of the sizes (pixels/physical) must be set.
Detected format of the image.
Size of the picture in pixels.
A physical size in 0.01mm. Used by vector images.
0 = use workbook DPI.
0 = use workbook DPI.
Convert color in ClosedXML representation to specified OpenXML type.
The descendant of .
The existing instance of ColorType.
Color in ClosedXML format.
Flag specifying that the color should be saved in
differential format (affects the transparent color processing).
The original color in OpenXML format.
Convert color in ClosedXML representation to specified OpenXML type.
The descendant of .
The existing instance of ColorType.
Color in ClosedXML format.
Flag specifying that the color should be saved in
differential format (affects the transparent color processing).
The original color in OpenXML format.
Convert color in OpenXML representation to ClosedXML type.
Color in OpenXML format.
The dictionary containing parsed colors to optimize performance.
The color in ClosedXML format.
Convert color in OpenXML representation to ClosedXML type.
Color in OpenXML format.
The dictionary containing parsed colors to optimize performance.
The color in ClosedXML format.
Here we perform the actual conversion from OpenXML color to ClosedXML color.
OpenXML color. Must be either or .
Since these types do not implement a common interface we use dynamic.
The dictionary containing parsed colors to optimize performance.
The color in ClosedXML format.
Initialize properties of the existing instance of the color in OpenXML format basing on properties of the color
in ClosedXML format.
OpenXML color. Must be either or .
Since these types do not implement a common interface we use dynamic.
Color in ClosedXML format.
Flag specifying that the color should be saved in
differential format (affects the transparent color processing).