Class CellRecordCollection
Represents the collection of CellRecord.
Implements
Inherited Members
Namespace: Syncfusion.XlsIO.Implementation.Collections
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class CellRecordCollection : CommonObject, IParentApplication, IDisposable, IDictionary, ICollection, IEnumerable
Constructors
CellRecordCollection(IApplication, Object)
Initializes new instance of the collection.
Declaration
public CellRecordCollection(IApplication application, object parent)
Parameters
Type | Name | Description |
---|---|---|
IApplication | application | Application object for the collection. |
System.Object | parent | Parent object for the collection. |
Properties
Count
Gets number of elements in the collection. Read-only.
Declaration
public int Count { get; }
Property Value
Type |
---|
System.Int32 |
FirstColumn
Gets first used column. Read-only.
Declaration
public int FirstColumn { get; }
Property Value
Type |
---|
System.Int32 |
FirstRow
Gets first used row. Read-only.
Declaration
public int FirstRow { get; }
Property Value
Type |
---|
System.Int32 |
IsFixedSize
Gets a value indicating whether the IDictionary has a fixed size. Read-only.
Declaration
public bool IsFixedSize { get; }
Property Value
Type |
---|
System.Boolean |
IsReadOnly
Gets a value indicating whether the IDictionary is read-only. Read-only.
Declaration
public bool IsReadOnly { get; }
Property Value
Type |
---|
System.Boolean |
IsSynchronized
Gets a value indicating whether access to the ICollection is synchronized. Read-only.
Declaration
public bool IsSynchronized { get; }
Property Value
Type |
---|
System.Boolean |
Item[Int32, Int32]
Gets or sets the element with the specified one-based row and column indexes.
Declaration
public ICellPositionFormat this[int iRow, int iColumn] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | |
System.Int32 | iColumn |
Property Value
Type |
---|
ICellPositionFormat |
Item[Int64]
Gets or sets the element with the specified key of long type.
Declaration
public ICellPositionFormat this[long key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key |
Property Value
Type |
---|
ICellPositionFormat |
Item[Object]
Gets or sets the element with the specified key of object type.
Declaration
public object this[object key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Object | key |
Property Value
Type |
---|
System.Object |
Keys
Gets an ICollection containing the keys of the IDictionary. Read-only.
Declaration
public ICollection Keys { get; }
Property Value
Type |
---|
System.Collections.ICollection |
LastColumn
Gets last used column. Read-only.
Declaration
public int LastColumn { get; }
Property Value
Type |
---|
System.Int32 |
LastRow
Gets last used row. Read-only.
Declaration
public int LastRow { get; }
Property Value
Type |
---|
System.Int32 |
RecordExtractor
Gets the record extractor of the cell record collection.
Declaration
public RecordExtractor RecordExtractor { get; }
Property Value
Type |
---|
RecordExtractor |
SyncRoot
Gets an object that can be used to synchronize access to the ICollection. Read-only.
Declaration
public object SyncRoot { get; }
Property Value
Type |
---|
System.Object |
Table
Gets or sets table with cell records. Read-only.
Declaration
public RecordTable Table { get; set; }
Property Value
Type |
---|
RecordTable |
UseCache
Indicates whether we should use ranges cache or not. Default value if false.
Declaration
public bool UseCache { get; set; }
Property Value
Type |
---|
System.Boolean |
Values
Gets an ICollection containing the values in the IDictionary. Read-only.
Declaration
public ICollection Values { get; }
Property Value
Type |
---|
System.Collections.ICollection |
Version
Gets or sets ExcelVersion
of the collection.
Declaration
public ExcelVersion Version { get; set; }
Property Value
Type |
---|
ExcelVersion |
Methods
Add(ICellPositionFormat)
Adds an specified cell to the IDictionary.
Declaration
public void Add(ICellPositionFormat value)
Parameters
Type | Name | Description |
---|---|---|
ICellPositionFormat | value | The Object to use as the value of the element to add. |
Add(Int64, ICellPositionFormat)
Adds an element with the provided key and value to the IDictionary.
Declaration
public void Add(long key, ICellPositionFormat value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | The Object to use as the key of the element to add. |
ICellPositionFormat | value | The Object to use as the value of the element to add. |
Add(Object, Object)
Adds an element with the provided key and value to the IDictionary.
Declaration
public void Add(object key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | The Object to use as the key of the element to add. |
System.Object | value | The Object to use as the value of the element to add. |
AddRecord(BiffRecordRaw, Boolean)
Adds record to the collection from BiffRecord with ignore style options.
Declaration
public void AddRecord(BiffRecordRaw recordToAdd, bool bIgnoreStyles)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.XlsIO.Parser.Biff_Records.BiffRecordRaw | recordToAdd | Record to add. |
System.Boolean | bIgnoreStyles | Indicates whether to ignore styles. |
AddRecord(ICellPositionFormat, Boolean)
Adds record to the collection from cell postion format with ignore style options.
Declaration
public void AddRecord(ICellPositionFormat cell, bool bIgnoreStyles)
Parameters
Type | Name | Description |
---|---|---|
ICellPositionFormat | cell | Record to add. |
System.Boolean | bIgnoreStyles | Indicates whether to ignore styles. |
CacheAndRemove(RangeImpl, Int32, Int32, ref Int32, ref Int32, Boolean)
Caches and removes specified rectangle from the table.
Declaration
public RecordTable CacheAndRemove(RangeImpl sourceRange, int iDeltaRow, int iDeltaColumn, ref int iMaxRow, ref int iMaxColumn, bool bInsert)
Parameters
Type | Name | Description |
---|---|---|
RangeImpl | sourceRange | Source range. |
System.Int32 | iDeltaRow | Row delta to add to the resulting table. |
System.Int32 | iDeltaColumn | Column delta to add to the resulting table. |
System.Int32 | iMaxRow | Output maximum zero-based row index. |
System.Int32 | iMaxColumn | Output maximum zero-based column index. |
System.Boolean | bInsert | Boolean flag to indicate if a row is moved or inserted. |
Returns
Type | Description |
---|---|
RecordTable | Cached table. |
CacheIntersection(IRange, IRange, out Rectangle)
Caches intersection of the two ranges.
Declaration
public RecordTable CacheIntersection(IRange destination, IRange source, out Rectangle rectIntersection)
Parameters
Type | Name | Description |
---|---|---|
IRange | destination | The first range to intersect. |
IRange | source | The second range to intersect. |
System.Drawing.Rectangle | rectIntersection | Output intersection rectangle. |
Returns
Type | Description |
---|---|
RecordTable | RecordTable with intersection. |
Clear()
Removes all elements from the IDictionary.
Declaration
public void Clear()
ClearData()
Removes all data saving cells formatting.
Declaration
public void ClearData()
ClearRange(Rectangle)
Clears range in the dictionary that corresponds to the specified range.
Declaration
public void ClearRange(Rectangle rect)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Rectangle | rect | Rectangle to clear. |
Clone(Object)
Creates a new object that is a copy of the current instance.
Declaration
public CellRecordCollection Clone(object parent)
Parameters
Type | Name | Description |
---|---|---|
System.Object | parent | Parent object for a copy of this instance. |
Returns
Type | Description |
---|---|
CellRecordCollection | A new object that is a copy of this instance. |
ContainBoolOrError(Int64)
Indicates if collection by index contain bool or error.
Declaration
public bool ContainBoolOrError(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Index of record. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if contain bool or error; otherwise - false. |
ContainFormulaBoolOrError(Int64)
Indicates if collection by index contain bool or error as formula value.
Declaration
public bool ContainFormulaBoolOrError(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Index of record. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if contain number; otherwise - false. |
ContainFormulaNumber(Int64)
Indicates if collection by index contain number as formula value.
Declaration
public bool ContainFormulaNumber(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Index of record. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if contain number; otherwise - false. |
ContainNumber(Int64)
Indicates if collection by index contain number.
Declaration
public bool ContainNumber(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Index of record. |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if contain number; otherwise - false. |
Contains(Int32, Int32)
Determines whether the RecordTable contains an element with row and column.
Declaration
public bool Contains(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index of the cell to locate. |
System.Int32 | iColumn | One-based column index of the cell to locate. |
Returns
Type | Description |
---|---|
System.Boolean | True if the IDictionary contains an element with the key; otherwise, False. |
Contains(Int64)
Determines whether the RecordTable contains an element with the specified key of long type.
Declaration
public bool Contains(long key)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | The key to locate in the IDictionary. |
Returns
Type | Description |
---|---|
System.Boolean | True if the IDictionary contains an element with the key; otherwise, False. |
Contains(Object)
Determines whether the RecordTable contains an element with the specified key of object type.
Declaration
public bool Contains(object key)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | The key to locate in the IDictionary. |
Returns
Type | Description |
---|---|
System.Boolean | True if the IDictionary contains an element with the key; otherwise, False. |
ContainsRow(Int32)
Determines whether collection contains row.
Declaration
public bool ContainsRow(int iRowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRowIndex | Zero-based row index. |
Returns
Type | Description |
---|---|
System.Boolean | True if the collection contains at least one element with specified row index; otherwise, False. |
CopyCell(ICellPositionFormat, String, IDictionary, Int64, WorkbookImpl, Dictionary<Int32, Int32>, ExcelCopyRangeOptions, Int32)
Copies cell into another worksheet.
Declaration
public bool CopyCell(ICellPositionFormat cell, string strFormulaValue, IDictionary dicXFIndexes, long lNewIndex, WorkbookImpl book, Dictionary<int, int> dicFontIndexes, ExcelCopyRangeOptions options, int destXFIndex)
Parameters
Type | Name | Description |
---|---|---|
ICellPositionFormat | cell | Cell to copy. |
System.String | strFormulaValue | Formula string value of the cell. |
System.Collections.IDictionary | dicXFIndexes | Dictionary with updated extended format indexes, or Null if indexes were not updated. |
System.Int64 | lNewIndex | New cell index |
WorkbookImpl | book | Source workbook. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicFontIndexes | Dictionary with updated font indexes or Null if indexes were not updated. |
ExcelCopyRangeOptions | options | Copy options. |
System.Int32 | destXFIndex |
Returns
Type | Description |
---|---|
System.Boolean | True if the cell is copied else false. |
CopyCells(CellRecordCollection, Dictionary<String, String>, Dictionary<String, String>, Dictionary<Int32, Int32>, Dictionary<Int32, Int32>, Dictionary<Int32, Int32>, Dictionary<Int32, Int32>)
Copies cells from another worksheet.
Declaration
public void CopyCells(CellRecordCollection sourceCells, Dictionary<string, string> hashStyleNames, Dictionary<string, string> hashWorksheetNames, Dictionary<int, int> hashExtFormatIndexes, Dictionary<int, int> dicNewNameIndexes, Dictionary<int, int> dicFontIndexes, Dictionary<int, int> dictExternSheet)
Parameters
Type | Name | Description |
---|---|---|
CellRecordCollection | sourceCells | Source cells collection to copy cells from. |
System.Collections.Generic.Dictionary<System.String, System.String> | hashStyleNames | Dictionary with changes in style indexes, key - old style index, value - new style index. |
System.Collections.Generic.Dictionary<System.String, System.String> | hashWorksheetNames | Dictionary with changes in worksheet names. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | hashExtFormatIndexes | Dictionary with new extended format indexes. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicNewNameIndexes | Dictionary with new name indexes. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dicFontIndexes | Dictionary with new font indexes. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dictExternSheet | External sheet dictionary. |
CopyStyle(Int32, Int32, Int32, Int32)
Copies style from one cell into another.
Declaration
public void CopyStyle(int iSourceRow, int iSourceColumn, int iDestRow, int iDestColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iSourceRow | One-based row index of the source cell. |
System.Int32 | iSourceColumn | One-based column index of the source cell. |
System.Int32 | iDestRow | One-based row index of the destination cell. |
System.Int32 | iDestColumn | One-based column index of the destination cell. |
CopyTo(Array, Int32)
Copies the elements of the ICollection to an Array, starting at a particular Array index.
Declaration
public void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Array | array | The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
CreateCell(Int32, Int32, TBIFFRecord)
Creates new cell.
Declaration
public ICellPositionFormat CreateCell(int iRow, int iColumn, TBIFFRecord recordType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index of the cell to create. |
System.Int32 | iColumn | One-based column index of the cell to create. |
TBIFFRecord | recordType | Record type. |
Returns
Type | Description |
---|---|
ICellPositionFormat | Created cell. |
CreateCellNoAdd(Int32, Int32, TBIFFRecord)
Creates new cell without adding it to the collection..
Declaration
public ICellPositionFormat CreateCellNoAdd(int iRow, int iColumn, TBIFFRecord recordType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index of the cell to create. |
System.Int32 | iColumn | One-based column index of the cell to create. |
TBIFFRecord | recordType | Record type. |
Returns
Type | Description |
---|---|
ICellPositionFormat | Created cell. |
ExtractRanges(BiffReader, Boolean, Dictionary<Int32, Int32>, IDecryptor)
Extracts ranges from the reader.
Declaration
public void ExtractRanges(BiffReader reader, bool bIgnoreStyles, Dictionary<int, int> hashNewXFIndexes, IDecryptor decryptor)
Parameters
Type | Name | Description |
---|---|---|
BiffReader | reader | Reader to extract ranges from. |
System.Boolean | bIgnoreStyles | Indicates whether to ignore styles. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | hashNewXFIndexes | Dictionary with new XF indexes when bIgnoreStyles is set to true. |
IDecryptor | decryptor | Decryptor used to decrypt data if necessary. |
ExtractRangesFast(IndexRecord, BiffReader, Boolean, Dictionary<Int32, Int32>)
Extracts ranges from the reader.
Declaration
public bool ExtractRangesFast(IndexRecord index, BiffReader reader, bool bIgnoreStyles, Dictionary<int, int> hashNewXFIndexes)
Parameters
Type | Name | Description |
---|---|---|
Syncfusion.XlsIO.Parser.Biff_Records.IndexRecord | index | IndexRecord that contains all required information. |
BiffReader | reader | Reader to extract ranges from. |
System.Boolean | bIgnoreStyles | Indicates whether to ignore styles. |
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | hashNewXFIndexes | Dictionary with new XF indexes when bIgnoreStyles is set to true. |
Returns
Type | Description |
---|---|
System.Boolean | True if parsing succeeded. |
FillLabelSSTRTFString(LabelSSTRecord, Boolean, RichTextString)
Fills rich text string object with string data.
Declaration
public void FillLabelSSTRTFString(LabelSSTRecord labelSST, bool bAutofitRows, RichTextString richText)
Parameters
Type | Name | Description |
---|---|---|
LabelSSTRecord | labelSST | Record to get data from. |
System.Boolean | bAutofitRows | Indicates whether we are interested in correct height or width. |
RichTextString | richText | String to fill. |
FillRTFString(Int64, Boolean, RichTextString)
Returns string value associated with specified cell index.
Declaration
public void FillRTFString(long cellIndex, bool bAutofitRows, RichTextString richText)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Index to cell. |
System.Boolean | bAutofitRows | Indicates whether we are interested in correct height or width. |
RichTextString | richText | String object to fill. |
Find(IRange, Byte, Boolean, Boolean)
Finds the cell positions based on find value of byte type.
Declaration
public List<long> Find(IRange range, byte findValue, bool bIsError, bool bIsFindFirst)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Storage range. |
System.Byte | findValue | Value to find. |
System.Boolean | bIsError | Indicates whether we should look for error code or boolean value. |
System.Boolean | bIsFindFirst | If findfirst - true then returns range; otherwise - array with all found values. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int64> | List with cell indexes that contains specified value. |
Find(IRange, Double, ExcelFindType, Boolean)
Finds the cell positions based on find value of double type.
Declaration
public List<long> Find(IRange range, double findValue, ExcelFindType flags, bool bIsFindFirst)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Storage range. |
System.Double | findValue | Value to find. |
ExcelFindType | flags | If true - finds first value; otherwise - all values. |
System.Boolean | bIsFindFirst | If findfirst - true then returns range; otherwise - array with all found values. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int64> | List with cell indexes that contains specified value. |
Find(IRange, String, ExcelFindType, ExcelFindOptions, Boolean)
Finds the cell positions based on find value of string type with find option.
Declaration
public List<long> Find(IRange range, string findValue, ExcelFindType flags, ExcelFindOptions findOptions, bool bIsFindFirst)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Storage range. |
System.String | findValue | Value to find. |
ExcelFindType | flags | If true - finds first value; otherwise - all values. |
ExcelFindOptions | findOptions | Way to find |
System.Boolean | bIsFindFirst | If findfirst - true then returns range; otherwise - array with all found values. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int64> | List with cell indexes that contains specified value. |
Find(IRange, String, ExcelFindType, Boolean)
Finds the cell positions based on find value of byte type.
Declaration
public List<long> Find(IRange range, string findValue, ExcelFindType flags, bool bIsFindFirst)
Parameters
Type | Name | Description |
---|---|---|
IRange | range | Storage range. |
System.String | findValue | Value to find. |
ExcelFindType | flags | If true - finds first value; otherwise - all values. |
System.Boolean | bIsFindFirst | If findfirst - true then returns range; otherwise - array with all found values. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int64> | List with cell indexes that contains specified value. |
Find(Dictionary<Int32, Object>)
Finds the cell positions which has a given dictionary index.
Declaration
public List<long> Find(Dictionary<int, object> dictIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Object> | dictIndexes | Dictionary index to be found. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int64> | List with cell indexes that contains specified value. |
FindRecord(TBIFFRecord, Int32, Int32, Int32)
Searches for the record of specified type.
Declaration
public int FindRecord(TBIFFRecord recordType, int iRow, int iCol, int iLastCol)
Parameters
Type | Name | Description |
---|---|---|
TBIFFRecord | recordType | Record type to look for. |
System.Int32 | iRow | One-based index to the row to look at. |
System.Int32 | iCol | One-based index of the column to start looking at. |
System.Int32 | iLastCol | One-based index of the column to end looking at. |
Returns
Type | Description |
---|---|
System.Int32 | Column index that contains record of the specified type or value beyond iLastCol if not found. |
FreeRange(Int32, Int32)
Free's range object.
Declaration
public void FreeRange(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index of the range object to remove from internal cache. |
System.Int32 | iColumn | One-based column index of the range object to remove from internal cache. |
GetArrayRecord(Int32, Int32)
Returns array record corresponding to the cell
Declaration
public ArrayRecord GetArrayRecord(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index of the cell to get ArrayRecord for. |
System.Int32 | iColumn | One-based column index of the cell to get ArrayRecord for. |
Returns
Type | Description |
---|---|
ArrayRecord | Corresponding array record. |
GetBool(Int64, out Boolean)
Gets bool value by cellindex.
Declaration
public bool GetBool(long cellIndex, out bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.Boolean | value | Returns value by cell index. |
Returns
Type | Description |
---|---|
System.Boolean | If true than value is correct; otherwise incorrect. |
GetCellFont(Int64)
Gets font by cell index.
Declaration
public IFont GetCellFont(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
IFont | Returns font or null. |
GetCellFormatting(Int64)
Returns object containing cell formatting.
Declaration
public IExtendedFormat GetCellFormatting(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index to get formatting for. |
Returns
Type | Description |
---|---|
IExtendedFormat | An ojbect containing cell formatting. |
GetCellRecord(Int32, Int32)
Returns cell record based on row and column index.
Declaration
public ICellPositionFormat GetCellRecord(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index. |
System.Int32 | iColumn | One-based column index. |
Returns
Type | Description |
---|---|
ICellPositionFormat | Corresponding cell record. |
GetCellRecord(Int64)
Returns cell record based on the key.
Declaration
public ICellPositionFormat GetCellRecord(long key)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | Cell key. |
Returns
Type | Description |
---|---|
ICellPositionFormat | Corresponding cell record. |
GetCellStyle(Int64)
Gets cell style by cell index.
Declaration
public IStyle GetCellStyle(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
IStyle | Returns cell index. |
GetDateTime(Int64)
Gets date time by cell index.
Declaration
public DateTime GetDateTime(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.DateTime | Returns date time or null. |
GetEnumerator()
Returns an IDictionaryEnumerator for the IDictionary.
Declaration
public IDictionaryEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IDictionaryEnumerator | An IDictionaryEnumerator for the IDictionary. |
GetError(Int64)
Gets error value by cell index.
Declaration
public string GetError(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.String | Returns string that represents error value. |
GetExtendedFormatIndex(Int32, Int32)
Gets extended format index by row and column index.
Declaration
public int GetExtendedFormatIndex(int row, int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | One-based row index. |
System.Int32 | column | One-based column index |
Returns
Type | Description |
---|---|
System.Int32 | Returns extended format index or int.MinValue if not found. |
GetExtendedFormatIndex(Int64)
Gets extended format index by cell index.
Declaration
public int GetExtendedFormatIndex(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns extended format index or int.MINVALUE. |
GetExtendedFormatIndexByColumn(Int32)
Gets extended format index of the column.
Declaration
public int GetExtendedFormatIndexByColumn(int column)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | column | One-based column index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns extended format index or int.MinValue if not found. |
GetExtendedFormatIndexByRow(Int32)
Gets extended format index of the row.
Declaration
public int GetExtendedFormatIndexByRow(int row)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | row | One-based row index. |
Returns
Type | Description |
---|---|
System.Int32 | Returns extended format index or int.MinValue if not found. |
GetFormula(Int64)
Gets formula value by cell index.
Declaration
public string GetFormula(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.String | Returns formula value or null. |
GetFormula(Int64, Boolean)
Gets formula value by cell index with R1C1 notation.
Declaration
public string GetFormula(long cellIndex, bool isR1C1)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.Boolean | isR1C1 | If true - returns in R1C1 notations. |
Returns
Type | Description |
---|---|
System.String | Returns formula value or null. |
GetFormula(Int64, Boolean, NumberFormatInfo)
Gets formula value by cell index with number format information.
Declaration
public string GetFormula(long cellIndex, bool isR1C1, NumberFormatInfo numberInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.Boolean | isR1C1 | If true - returns in R1C1 notations. |
System.Globalization.NumberFormatInfo | numberInfo | Represents number info. Can be null. |
Returns
Type | Description |
---|---|
System.String | Returns formula value or null. |
GetFormulaNumberValue(Int64)
Returns formula value.
Declaration
public double GetFormulaNumberValue(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.Double | Formula value if appropriate record was found; otherwise double.MinValue. |
GetFormulaStringValue(Int64)
Returns string formula value.
Declaration
public string GetFormulaStringValue(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.String | String formula value. |
GetLabelSSTRTFString(Int64, Boolean)
Gets the RTF string in LabelSST of the cell index.
Declaration
public RichTextString GetLabelSSTRTFString(long cellIndex, bool bAutofitRows)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.Boolean | bAutofitRows | Indicates whether we are interested in correct height or width. |
Returns
Type | Description |
---|---|
RichTextString | RTF in the cell index. |
GetMaximumColumnIndex(Int32, Int32)
Returns maximum used column.
Declaration
public int GetMaximumColumnIndex(int iStartRow, int iEndRow)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iStartRow | Start row. |
System.Int32 | iEndRow | End row. |
Returns
Type | Description |
---|---|
System.Int32 | Maximum used column. |
GetMaximumRowIndex(Int32, Int32)
Returns maximum used row.
Declaration
public int GetMaximumRowIndex(int iStartColumn, int iEndColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iStartColumn | Start column. |
System.Int32 | iEndColumn | End column. |
Returns
Type | Description |
---|---|
System.Int32 | maximum used row. |
GetMinimumColumnIndex(Int32, Int32)
Returns minimum used column.
Declaration
public int GetMinimumColumnIndex(int iStartRow, int iEndRow)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iStartRow | One-based index of the start row. |
System.Int32 | iEndRow | One-based index of the end row. |
Returns
Type | Description |
---|---|
System.Int32 | One-based index of the minimum used column. |
GetMinimumRowIndex(Int32, Int32)
Returns minimum used row.
Declaration
public int GetMinimumRowIndex(int iStartColumn, int iEndColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iStartColumn | Start column. |
System.Int32 | iEndColumn | End column. |
Returns
Type | Description |
---|---|
System.Int32 | Minimum used row. |
GetNumber(Int64)
Returns cell value by cell index.
Declaration
public double GetNumber(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.Double | Cell value if appropriate record was found; otherwise returns double.MinValue. |
GetNumberWithoutFormula(Int64)
Returns cell value by cell index without formula value.
Declaration
public double GetNumberWithoutFormula(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.Double | Cell value if appropriate record was found; otherwise returns double.MinValue. |
GetRange(Int32, Int32)
Returns cell range based on row and column index.
Declaration
public RangeImpl GetRange(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index. |
System.Int32 | iColumn | One-based column index. |
Returns
Type | Description |
---|---|
RangeImpl | Corresponding cell range. |
GetRange(Int64)
Returns cell range based on cell position.
Declaration
public RangeImpl GetRange(long key)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | Cell key. |
Returns
Type | Description |
---|---|
RangeImpl | Corresponding cell range. |
GetRowData(Int32, Int32, Int32, out Int32, out Int32, ExcelVersion)
Returns array of all cells in the specified row.
Declaration
protected RowStorage GetRowData(int index, int iFirstColumn, int iLastColumn, out int min, out int max, ExcelVersion version)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | One-based index of row. |
System.Int32 | iFirstColumn | One-based first column in the parent worksheet. |
System.Int32 | iLastColumn | One-based last column in the parent worksheet. |
System.Int32 | min | Variable that receives first used column of the row. |
System.Int32 | max | Variable that receives last used column of the row. |
ExcelVersion | version | Destination excel version. |
Returns
Type | Description |
---|---|
RowStorage | Array of all cells in the specified row. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | When values is null. |
GetRTFString(Int64, Boolean)
Returns string value associated with specified cell index.
Declaration
public RichTextString GetRTFString(long cellIndex, bool bAutofitRows)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Index to cell. |
System.Boolean | bAutofitRows | Indicates whether we are interested in correct height or width. |
Returns
Type | Description |
---|---|
RichTextString | String value associated with specified cell index. |
GetText(Int64)
Returns text value.
Declaration
public string GetText(long cellIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
Returns
Type | Description |
---|---|
System.String | Text value if appropriate record was found; otherwise - empty string. |
GetValue(Int64, Int32, Int32, IRange, String)
Gets string value by cell index.
Declaration
public string GetValue(long cellIndex, int row, int column, IRange range, string seperator)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell Index. |
System.Int32 | row | Row index |
System.Int32 | column | Column index |
IRange | range | Range from which value to be returned |
System.String | seperator | CSV seperator |
Returns
Type | Description |
---|---|
System.String | Returns string value or empty string. |
MarkUsedReferences(Boolean[])
Sets items with used reference indexes to true.
Declaration
public void MarkUsedReferences(bool[] usedItems)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean[] | usedItems | Array to mark used references in. |
OnDispose()
This method is called when object is about to be disposed.
Declaration
protected override void OnDispose()
Overrides
ReAddAllStrings()
Looks through all records and calls AddIncrease for each LabelSST record.
Declaration
public void ReAddAllStrings()
Remove(Int32, Int32)
Removes the element from the IDictionary based on the row and column index.
Declaration
public void Remove(int iRow, int iColumn)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index of the cell to remove. |
System.Int32 | iColumn | One-based column index of the cell to remove. |
Remove(Int64)
Removes the element from the IDictionary with the specified key of long type.
Declaration
public void Remove(long key)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | The key of the element to remove. |
Remove(Object)
Removes the element from the IDictionary with the specified key of object type.
Declaration
public void Remove(object key)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | The key of the element to remove. |
RemoveLastColumn(Int32)
Removes last column from the worksheet.
Declaration
public void RemoveLastColumn(int iColumnIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iColumnIndex | One-based column index. |
RemoveRow(Int32)
Removes last column from the worksheet.
Declaration
public void RemoveRow(int iRowIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRowIndex | One-based column index. |
ReplaceSharedFormula()
Replaces all shared formula with ordinary formula.
Declaration
public void ReplaceSharedFormula()
Serialize(OffsetArrayList, List<DBCellRecord>)
Saves all rows into specified OffsetArrayList.
Declaration
public int Serialize(OffsetArrayList records, List<DBCellRecord> arrDBCells)
Parameters
Type | Name | Description |
---|---|---|
OffsetArrayList | records | OffsetArrayList that will receive all rows. |
System.Collections.Generic.List<DBCellRecord> | arrDBCells | List into which all DBCell record must be placed. |
Returns
Type | Description |
---|---|
System.Int32 | Number of DBCells. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | When records is null. |
SetArrayFormula(ArrayRecord)
Sets array formula.
Declaration
public void SetArrayFormula(ArrayRecord record)
Parameters
Type | Name | Description |
---|---|---|
ArrayRecord | record | Record to set. |
SetBlank(Int32, Int32, Int32)
Sets blank value.
Declaration
public void SetBlank(int iRow, int iCol, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.Int32 | iXFIndex | Represents extended format index. |
SetBooleanValue(Int32, Int32, Boolean)
Sets boolean value.
Declaration
public void SetBooleanValue(int iRow, int iCol, bool bValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based |
System.Boolean | bValue | Represents boolean value. |
SetBooleanValue(Int32, Int32, Boolean, Int32)
Sets boolean value with extended format.
Declaration
public void SetBooleanValue(int iRow, int iCol, bool bValue, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One-based. |
System.Int32 | iCol | Represents column index. One-based. |
System.Boolean | bValue | Represents boolean value. |
System.Int32 | iXFIndex | Represents xf index. |
SetBooleanValue(Int64, Boolean)
Sets boolean value in specified cell index.
Declaration
public void SetBooleanValue(long cellIndex, bool bValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.Boolean | bValue | Represents boolean value. |
SetCellRecord(Int32, Int32, ICellPositionFormat)
Sets cell record based on row and column index.
Declaration
public void SetCellRecord(int iRow, int iColumn, ICellPositionFormat cell)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index. |
System.Int32 | iColumn | One-based column index. |
ICellPositionFormat | cell | Cell to set. |
SetCellRecord(Int64, ICellPositionFormat)
Sets cell record based on cell index.
Declaration
public void SetCellRecord(long key, ICellPositionFormat cell)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | Cell key. |
ICellPositionFormat | cell | Cell to set. |
SetCellStyle(Int32, Int32)
Sets cell style in specified row and column.
Declaration
public void SetCellStyle(int iRow, int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index. |
System.Int32 | index | Index of the extended format to set. |
SetCellStyle(Int32, Int32, Int32)
Sets cell style with extended format index.
Declaration
public void SetCellStyle(int iRow, int iColumn, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index. |
System.Int32 | iColumn | One-based column index. |
System.Int32 | iXFIndex | Index of the extended format to set. |
SetErrorValue(Int32, Int32, Byte, Int32)
Sets error value with error code and extended format index.
Declaration
public void SetErrorValue(int iRow, int iCol, byte errorCode, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.Byte | errorCode | Represents error code. |
System.Int32 | iXFIndex | Represents xf index. |
SetErrorValue(Int32, Int32, String)
Sets error value with a string value and default extended format index.
Declaration
public void SetErrorValue(int iRow, int iCol, string strValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.String | strValue | Represents error value. |
SetErrorValue(Int32, Int32, String, Int32)
Sets error value with a string value and extended format index.
Declaration
public void SetErrorValue(int iRow, int iCol, string strValue, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.String | strValue | Represents error value. |
System.Int32 | iXFIndex | Represents xf index. |
SetErrorValue(Int64, String)
Sets error value with a string value in cell index.
Declaration
public void SetErrorValue(long cellIndex, string strValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.String | strValue | Represents error value. |
SetFormula(Int32, Int32, String, Int32)
Sets formula value with extended format index.
Declaration
public void SetFormula(int iRow, int iCol, string strValue, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.String | strValue | Represents formula to set. |
System.Int32 | iXFIndex | Represents extended format index. |
SetFormula(Int32, Int32, String, Int32, Boolean)
Sets formula value with extended format index and R1C1 notation.
Declaration
public void SetFormula(int iRow, int iCol, string strValue, int iXFIndex, bool isR1C1)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.String | strValue | Represents formula to set. |
System.Int32 | iXFIndex | Represents extended format index. |
System.Boolean | isR1C1 | If true - value in R1C1 notation. |
SetFormula(Int32, Int32, String, Int32, Boolean, Boolean, NumberFormatInfo)
Sets formula value with extended format index, number format information, R1C1 notation and parse formula.
Declaration
public void SetFormula(int iRow, int iCol, string strValue, int iXFIndex, bool isR1C1, bool bParse, NumberFormatInfo formatInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.String | strValue | Represents formula to set. |
System.Int32 | iXFIndex | Represents extended format index. |
System.Boolean | isR1C1 | If true - value in R1C1 notation. |
System.Boolean | bParse | If true - parse formula. |
System.Globalization.NumberFormatInfo | formatInfo | Represent number format info, can be null. |
SetFormula(Int32, Int32, String, Int32, Boolean, NumberFormatInfo)
Sets formula value with extended format index, number format information and R1C1 notation.
Declaration
public void SetFormula(int iRow, int iCol, string strValue, int iXFIndex, bool isR1C1, NumberFormatInfo formatInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.String | strValue | Represents formula to set. |
System.Int32 | iXFIndex | Represents extended format index. |
System.Boolean | isR1C1 | If true - value in R1C1 notation. |
System.Globalization.NumberFormatInfo | formatInfo | Represent number format info, can be null. |
SetNumberValue(Int32, Int32, Double)
Sets number value with default extended format index.
Declaration
public void SetNumberValue(int iRow, int iCol, double dValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One-based. |
System.Int32 | iCol | Represents column index. One-based. |
System.Double | dValue | Represents number value. |
SetNumberValue(Int32, Int32, Double, Int32)
Sets number value with specified extended format index.
Declaration
public void SetNumberValue(int iRow, int iCol, double dValue, int iXFIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One-based. |
System.Int32 | iCol | Represents column index. One-based. |
System.Double | dValue | Represents number value. |
System.Int32 | iXFIndex | Represents xf index. |
SetNumberValue(Int64, Double)
Sets number value in cell index.
Declaration
public void SetNumberValue(long cellIndex, double dValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.Double | dValue | Represents number value. |
SetRange(Int32, Int32, RangeImpl)
Sets cell range with row and column index.
Declaration
public void SetRange(int iRow, int iColumn, RangeImpl range)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | One-based row index. |
System.Int32 | iColumn | One-based column index. |
RangeImpl | range | Range to set. |
SetRange(Int64, RangeImpl)
Sets cell range with cell index.
Declaration
public void SetRange(long key, RangeImpl range)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | key | Cell key. |
RangeImpl | range | Range to set. |
SetRTF(Int32, Int32, Int32, TextWithFormat)
Sets RTF value.
Declaration
public void SetRTF(int iRow, int iCol, int iXFIndex, TextWithFormat rtf)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.Int32 | iXFIndex | Represents extended format index. |
TextWithFormat | rtf | Represents rtf to set. |
SetSingleStringValue(Int32, Int32, Int32, Int32)
Sets string value from existing SST collection.
Declaration
public void SetSingleStringValue(int iRow, int iCol, int iXFIndex, int iSSTIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iRow | Represents row index. One based. |
System.Int32 | iCol | Represents column index. One based. |
System.Int32 | iXFIndex | Represents extended format index. |
System.Int32 | iSSTIndex | Represents SST index |
SetStringValue(Int64, String)
Sets string formula value.
Declaration
public void SetStringValue(long cellIndex, string strValue)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | cellIndex | Cell index. |
System.String | strValue | String value to set. |
UpdateExtendedFormatIndex(Dictionary<Int32, Int32>)
This method should be called immediately after extended format removal with IDictionary.
Declaration
public void UpdateExtendedFormatIndex(Dictionary<int, int> dictFormats)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.Int32, System.Int32> | dictFormats | Dictionary with updated extended formats. |
UpdateExtendedFormatIndex(Int32)
This method updates indexes to the extended formats after version change.
Declaration
public void UpdateExtendedFormatIndex(int maxCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxCount | New restriction for maximum possible XF index. |
UpdateExtendedFormatIndex(Int32[])
This method should be called immediately after extended format removal.
Declaration
public void UpdateExtendedFormatIndex(int[] arrFormats)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | arrFormats | Array with updated extended formats. |
UpdateFormula(Int32, Int32, Rectangle, Int32, Rectangle)
Updates formulas after copy operation.
Declaration
public void UpdateFormula(int iCurIndex, int iSourceIndex, Rectangle sourceRect, int iDestIndex, Rectangle destRect)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iCurIndex | Current worksheet index. |
System.Int32 | iSourceIndex | Source worksheet index. |
System.Drawing.Rectangle | sourceRect | Source rectangle. |
System.Int32 | iDestIndex | Destination worksheet index. |
System.Drawing.Rectangle | destRect | Destination rectangle. |
UpdateNameIndexes(WorkbookImpl, IDictionary<Int32, Int32>)
Updates indexes to named ranges from IDictionary.
Declaration
public void UpdateNameIndexes(WorkbookImpl book, IDictionary<int, int> dicNewIndex)
Parameters
Type | Name | Description |
---|---|---|
WorkbookImpl | book | Parent workbook. |
System.Collections.Generic.IDictionary<System.Int32, System.Int32> | dicNewIndex | New indexes. |
UpdateNameIndexes(WorkbookImpl, Int32[])
Updates indexes to named ranges from array of new index.
Declaration
public void UpdateNameIndexes(WorkbookImpl book, int[] arrNewIndex)
Parameters
Type | Name | Description |
---|---|---|
WorkbookImpl | book | Parent workbook. |
System.Int32[] | arrNewIndex | New indexes. |
UpdateReferenceIndexes(Int32[])
Updates reference indexes.
Declaration
public void UpdateReferenceIndexes(int[] arrUpdatedIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | arrUpdatedIndexes | Array with updated indexes. |
UpdateStringIndexes(List<Int32>)
Updates string indexes.
Declaration
public void UpdateStringIndexes(List<int> arrNewIndexes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<System.Int32> | arrNewIndexes | List with new indexes. |