ASP.NET Core

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class WorksheetGroup

    Show / Hide Table of Contents

    Class WorksheetGroup

    Represents group of worksheets.

    Inheritance
    System.Object
    CollectionBase<IWorksheet>
    CollectionBaseEx<IWorksheet>
    WorksheetGroup
    Implements
    System.Collections.Generic.IList<IWorksheet>
    System.Collections.Generic.ICollection<IWorksheet>
    System.Collections.Generic.IEnumerable<IWorksheet>
    System.Collections.IEnumerable
    IWorksheetGroup
    IWorksheet
    ITabSheet
    IParentApplication
    ICalcData
    ICloneParent
    Inherited Members
    CollectionBaseEx<IWorksheet>.OnClearComplete()
    CollectionBaseEx<IWorksheet>.OnInsert(Int32, IWorksheet)
    CollectionBaseEx<IWorksheet>.OnInsertComplete(Int32, IWorksheet)
    CollectionBaseEx<IWorksheet>.OnRemove(Int32, IWorksheet)
    CollectionBaseEx<IWorksheet>.OnRemoveComplete(Int32, IWorksheet)
    CollectionBaseEx<IWorksheet>.OnSet(Int32, IWorksheet, IWorksheet)
    CollectionBaseEx<IWorksheet>.OnSetComplete(Int32, IWorksheet, IWorksheet)
    CollectionBaseEx<IWorksheet>.FindParent(Type)
    CollectionBaseEx<IWorksheet>.FindParent(Type, Boolean)
    CollectionBaseEx<IWorksheet>.SetParent(Object)
    CollectionBaseEx<IWorksheet>.EnsureCapacity(Int32)
    CollectionBaseEx<IWorksheet>.ClearMaxValues()
    CollectionBaseEx<IWorksheet>.GenerateDefaultName(ICollection<IWorksheet>, String)
    CollectionBaseEx<IWorksheet>.GenerateDefaultName(ICollection, String)
    CollectionBaseEx<IWorksheet>.GenerateDefaultName(String, ICollection[])
    CollectionBaseEx<IWorksheet>.ChangeName(IDictionary, ValueChangedEventArgs)
    CollectionBaseEx<IWorksheet>.Application
    CollectionBaseEx<IWorksheet>.Parent
    CollectionBaseEx<IWorksheet>.QuietMode
    CollectionBaseEx<IWorksheet>.AppImplementation
    CollectionBaseEx<IWorksheet>.Changed
    CollectionBaseEx<IWorksheet>.Clearing
    CollectionBaseEx<IWorksheet>.Cleared
    CollectionBaseEx<IWorksheet>.Inserting
    CollectionBaseEx<IWorksheet>.Inserted
    CollectionBaseEx<IWorksheet>.Removing
    CollectionBaseEx<IWorksheet>.Removed
    CollectionBaseEx<IWorksheet>.Setting
    CollectionBaseEx<IWorksheet>.Set
    CollectionBase<IWorksheet>.Clear()
    CollectionBase<IWorksheet>.Insert(Int32, IWorksheet)
    CollectionBase<IWorksheet>.GetEnumerator()
    CollectionBase<IWorksheet>.RemoveAt(Int32)
    CollectionBase<IWorksheet>.IndexOf(IWorksheet)
    CollectionBase<IWorksheet>.Add(IWorksheet)
    CollectionBase<IWorksheet>.Contains(IWorksheet)
    CollectionBase<IWorksheet>.CopyTo(IWorksheet[], Int32)
    CollectionBase<IWorksheet>.Remove(IWorksheet)
    CollectionBase<IWorksheet>.IEnumerable.GetEnumerator()
    CollectionBase<IWorksheet>.Capacity
    CollectionBase<IWorksheet>.Count
    CollectionBase<IWorksheet>.InnerList
    CollectionBase<IWorksheet>.List
    CollectionBase<IWorksheet>.Item[Int32]
    CollectionBase<IWorksheet>.IsReadOnly
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.XlsIO.Implementation.Collections.Grouping
    Assembly: Syncfusion.XlsIO.Base.dll
    Syntax
    public class WorksheetGroup : CollectionBaseEx<IWorksheet>, IList<IWorksheet>, ICollection<IWorksheet>, IEnumerable<IWorksheet>, IEnumerable, IWorksheetGroup, IWorksheet, ITabSheet, IParentApplication, ICalcData, ICloneParent

    Constructors

    WorksheetGroup(IApplication, Object)

    Creates new instance of the worksheet group.

    Declaration
    public WorksheetGroup(IApplication application, object parent)
    Parameters
    Type Name Description
    IApplication application

    Application object for the new group.

    System.Object parent

    Parent object for the new group.

    Properties

    ActivePane

    Gets or sets index of the active pane.

    Declaration
    public int ActivePane { get; set; }
    Property Value
    Type Description
    System.Int32

    AutoFilters

    Gets the auto filters collection in the worksheet. Read-only.

    Declaration
    public IAutoFilters AutoFilters { get; }
    Property Value
    Type Description
    IAutoFilters

    CalcEngine

    Gets or sets the a CalcEngine object associated with ICalcData implementation.

    Declaration
    public CalcEngine CalcEngine { get; set; }
    Property Value
    Type Description
    CalcEngine

    Cells

    Gets the used cells in the worksheet. Read-only.

    Declaration
    public IRange[] Cells { get; }
    Property Value
    Type Description
    IRange[]

    Charts

    Gets charts collection in the worksheet. Read-only.

    Declaration
    public IChartShapes Charts { get; }
    Property Value
    Type Description
    IChartShapes

    CheckBoxes

    Gets inner checkboxes collection in the worksheet. Read-only.

    Declaration
    public ICheckBoxes CheckBoxes { get; }
    Property Value
    Type Description
    ICheckBoxes

    CodeName

    Name that is used by macros to access the workbook items.

    Declaration
    public string CodeName { get; set; }
    Property Value
    Type Description
    System.String

    Columns

    Gets a Range object that represents all the columns in the specified worksheet. Read-only.

    Declaration
    public IRange[] Columns { get; }
    Property Value
    Type Description
    IRange[]

    ComboBoxes

    Returns collection with all comboboxes inside this worksheet. Read-only.

    Declaration
    public IComboBoxes ComboBoxes { get; }
    Property Value
    Type Description
    IComboBoxes

    Comments

    Gets a comments collection in the worksheet.

    Declaration
    public IComments Comments { get; }
    Property Value
    Type Description
    IComments

    CustomProperties

    Gets a collection of custom properties of the worksheet. Read-only.

    Declaration
    public IWorksheetCustomProperties CustomProperties { get; }
    Property Value
    Type Description
    IWorksheetCustomProperties

    DataSorter

    Declaration
    public IDataSort DataSorter { get; }
    Property Value
    Type Description
    IDataSort

    DisplayPageBreaks

    Gets or sets a value that indicates whether page breaks (both automatic and manual) on the worksheet are displayed.

    Declaration
    public bool DisplayPageBreaks { get; set; }
    Property Value
    Type Description
    System.Boolean

    FirstVisibleColumn

    Gets or sets the first visible column index.

    Declaration
    public int FirstVisibleColumn { get; set; }
    Property Value
    Type Description
    System.Int32

    FirstVisibleRow

    Gets or sets the first visible row index.

    Declaration
    public int FirstVisibleRow { get; set; }
    Property Value
    Type Description
    System.Int32

    GridLineColor

    Gets or sets the color of the Grid line in the worksheet.

    Declaration
    public ExcelKnownColors GridLineColor { get; set; }
    Property Value
    Type Description
    ExcelKnownColors

    HasOleObject

    Gets whether the OLE object is present in the worksheet. Read-only.

    Declaration
    public bool HasOleObject { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if this instance is OLE object; otherwise, False.

    HorizontalSplit

    Gets or sets the position of horizontal split in the worksheet.

    Declaration
    public int HorizontalSplit { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Position of the horizontal split (by, 0 = No horizontal split): Unfrozen pane: Height of the top pane(s) (in twips = 1/20 of a point) Frozen pane: Number of visible rows in top pane(s)

    HPageBreaks

    Gets a HPageBreaksCollection that represents the horizontal page breaks in the worksheet. Read-only.

    Declaration
    public IHPageBreaks HPageBreaks { get; }
    Property Value
    Type Description
    IHPageBreaks

    HyperLinks

    Gets a hyperlink collections in the worksheet. Read-only.

    Declaration
    public IHyperLinks HyperLinks { get; }
    Property Value
    Type Description
    IHyperLinks

    Index

    Gets the index number of the worksheet within the collection of worksheet. Read-only.

    Declaration
    public int Index { get; }
    Property Value
    Type Description
    System.Int32

    IsDisplayZeros

    True if zero values to be displayed. otherwise, False.

    Declaration
    public bool IsDisplayZeros { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsEmpty

    Indicates whether collection is empty. Read-only.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    System.Boolean

    IsFreezePanes

    Defines whether freezed panes are applied.

    Declaration
    public bool IsFreezePanes { get; }
    Property Value
    Type Description
    System.Boolean

    IsGridLinesVisible

    True if grid lines are visible. otherwise, False.

    Declaration
    public bool IsGridLinesVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsPasswordProtected

    Indicates if the worksheet is password protected.

    Declaration
    public bool IsPasswordProtected { get; }
    Property Value
    Type Description
    System.Boolean

    IsRightToLeft

    Indicates whether worksheet is displayed right to left.

    Declaration
    public bool IsRightToLeft { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsRowColumnHeadersVisible

    True if row and column headers are visible. otherwise, False.

    Declaration
    public bool IsRowColumnHeadersVisible { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsSelected

    Indicates whether tab of this sheet is selected. Read-only.

    Declaration
    public bool IsSelected { get; }
    Property Value
    Type Description
    System.Boolean

    IsStringsPreserved

    True if all values in the worksheet are preserved as strings. otherwise, False.

    Declaration
    public bool IsStringsPreserved { get; set; }
    Property Value
    Type Description
    System.Boolean

    Item[Int32, Int32]

    Gets or sets cell range by row and column index. Row and column indexes are one-based.

    Declaration
    public IRange this[int row, int column] { get; }
    Parameters
    Type Name Description
    System.Int32 row

    One-based row index.

    System.Int32 column

    One-based column index.

    Property Value
    Type Description
    IRange

    Item[Int32, Int32, Int32, Int32]

    Get cell Range. Row and column indexes are one-based. Read-only.

    Declaration
    public IRange this[int row, int column, int lastRow, int lastColumn] { get; }
    Parameters
    Type Name Description
    System.Int32 row

    First row index. One-based.

    System.Int32 column

    First column index. One-based.

    System.Int32 lastRow

    Last row index. One-based.

    System.Int32 lastColumn

    Last column index. One-based.

    Property Value
    Type Description
    IRange

    Item[String]

    Gets cell Range. Read-only.

    Declaration
    public IRange this[string name] { get; }
    Parameters
    Type Name Description
    System.String name
    Property Value
    Type Description
    IRange

    Item[String, Boolean]

    Gets cell Range with R1C1Notation flag. Read-only.

    Declaration
    public IRange this[string name, bool IsR1C1Notation] { get; }
    Parameters
    Type Name Description
    System.String name
    System.Boolean IsR1C1Notation
    Property Value
    Type Description
    IRange

    LeftVisibleColumn

    Gets or sets the left visible column of the worksheet.

    Declaration
    public int LeftVisibleColumn { get; set; }
    Property Value
    Type Description
    System.Int32

    ListObjects

    Gets a collection of list objects in the worksheet. Read-only.

    Declaration
    public IListObjects ListObjects { get; }
    Property Value
    Type Description
    IListObjects

    MergedCells

    Gets all the merged ranges in the worksheet. Read-only.

    Declaration
    public IRange[] MergedCells { get; }
    Property Value
    Type Description
    IRange[]

    MigrantRange

    Gets instance of migrant range. Read-only.

    Declaration
    public IMigrantRange MigrantRange { get; }
    Property Value
    Type Description
    IMigrantRange
    Remarks

    The IMigrantRange interface can also be used to access a single cell or group of cells and manipulate it. You can prefer IMigrantRange instead of IRange while writing large amount of data which is an optimal way. Row and Column index can be changed by using ResetRowColumn(Int32, Int32) method.

    Name

    Returns or sets the name of the object. Read / write String.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    Names

    Gets a Names collection that represents the worksheet-specific names (names defined with the "WorksheetName!" prefix) in the worksheet. Read-only.

    Declaration
    public INames Names { get; }
    Property Value
    Type Description
    INames

    OleObjects

    Gets a collection of OleObjects in the worksheet.

    Declaration
    public IOleObjects OleObjects { get; }
    Property Value
    Type Description
    IOleObjects

    The OLE objects.

    OptionButtons

    Gets inner option buttons collection in the worksheet. Read-only.

    Declaration
    public IOptionButtons OptionButtons { get; }
    Property Value
    Type Description
    IOptionButtons

    PageSetup

    Gets a PageSetup object that contains all the page setup settings for the specified object. Read-only.

    Declaration
    public IPageSetup PageSetup { get; }
    Property Value
    Type Description
    IPageSetup

    ParentWorkbook

    Returns parent workbook. Read-only.

    Declaration
    public WorkbookImpl ParentWorkbook { get; }
    Property Value
    Type Description
    WorkbookImpl

    Pictures

    Gets pictures collection in the worksheet. Read-only.

    Declaration
    public IPictures Pictures { get; }
    Property Value
    Type Description
    IPictures

    PivotTables

    Gets a collection of pivot tables in the worksheet. Read-only.

    Declaration
    public IPivotTables PivotTables { get; }
    Property Value
    Type Description
    IPivotTables

    ProtectContents

    Indicates is current sheet is protected.

    Declaration
    public bool ProtectContents { get; }
    Property Value
    Type Description
    System.Boolean

    ProtectDrawingObjects

    True if objects are protected. Read-only.

    Declaration
    public bool ProtectDrawingObjects { get; }
    Property Value
    Type Description
    System.Boolean

    Protection

    Gets protected options. Read-only. For sets protection options use "Protect" method.

    Declaration
    public ExcelSheetProtection Protection { get; }
    Property Value
    Type Description
    ExcelSheetProtection

    ProtectScenarios

    True if the scenarios of the current sheet are protected. Read-only.

    Declaration
    public bool ProtectScenarios { get; }
    Property Value
    Type Description
    System.Boolean

    Range

    Gets a Range object that represents a cell or a range of cells in the worksheet.

    Declaration
    public IRange Range { get; }
    Property Value
    Type Description
    IRange

    Rows

    Gets a Range object that represents the rows in the specified worksheet. Read-only.

    Declaration
    public IRange[] Rows { get; }
    Property Value
    Type Description
    IRange[]

    Shapes

    Gets shape collection in the worksheet.

    Declaration
    public IShapes Shapes { get; }
    Property Value
    Type Description
    IShapes

    SparklineGroups

    Gets the sparkline groups.

    Declaration
    public ISparklineGroups SparklineGroups { get; }
    Property Value
    Type Description
    ISparklineGroups

    The sparkline groups.

    SplitCell

    Gets split cell range.

    Declaration
    public IRange SplitCell { get; }
    Property Value
    Type Description
    IRange

    StandardHeight

    Gets or sets the standard (default) height of all the rows in the worksheet, in points.

    Declaration
    public double StandardHeight { get; set; }
    Property Value
    Type Description
    System.Double

    StandardHeightFlag

    Gets or sets the standard (default) height option flag.

    Declaration
    public bool StandardHeightFlag { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Which defines that standard (default) row height and book default font height do not match.

    StandardWidth

    Gets or sets the standard (default) width of all the columns in the worksheet.

    Declaration
    public double StandardWidth { get; set; }
    Property Value
    Type Description
    System.Double

    TabColor

    Gets or Sets Tab color.

    Declaration
    public ExcelKnownColors TabColor { get; set; }
    Property Value
    Type Description
    ExcelKnownColors

    TabColorRGB

    Gets / sets tab color.

    Declaration
    public Color TabColorRGB { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    TabIndex

    Gets index in the parent ITabSheets collection. Read-only.

    Declaration
    public int TabIndex { get; }
    Property Value
    Type Description
    System.Int32

    TextBoxes

    Gets inner textboxes collection. Read-only.

    Declaration
    public ITextBoxes TextBoxes { get; }
    Property Value
    Type Description
    ITextBoxes

    TopVisibleRow

    Gets or sets the top visible row of the worksheet.

    Declaration
    public int TopVisibleRow { get; set; }
    Property Value
    Type Description
    System.Int32

    Type

    Gets the worksheet type. Read-only ExcelSheetType.

    Declaration
    public ExcelSheetType Type { get; }
    Property Value
    Type Description
    ExcelSheetType

    UsedCells

    Gets all not empty or accessed cells. Read-only.

    Declaration
    public IRange[] UsedCells { get; }
    Property Value
    Type Description
    IRange[]
    Remarks

    WARNING: This property creates Range object for each cell in the worksheet and creates new array each time user calls to it. It can cause huge memory usage especially if called frequently.

    UsedRange

    Gets a Range object that represents the used range on the specified worksheet. Read-only.

    Declaration
    public IRange UsedRange { get; }
    Property Value
    Type Description
    IRange

    UsedRangeIncludesFormatting

    Gets or sets whether used range should include cells with formatting.

    Declaration
    public bool UsedRangeIncludesFormatting { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    There are two different algorithms to create UsedRange object:

    1. Default. This property = true. The cell is included into UsedRange, even data is empty (maybe some formatting changed, maynot be - cell was accessed and record was created).
    2. This property = false. In this case XlsIO tries to remove empty rows and columns from all sides to make UsedRange smaller.

    UseRangesCache

    Indicates whether all created range objects should be cached or not.

    Declaration
    public bool UseRangesCache { get; set; }
    Property Value
    Type Description
    System.Boolean

    VerticalSplit

    Gets or sets the position of vertical split in the worksheet.

    Declaration
    public int VerticalSplit { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Position of the vertical split (px, 0 = No vertical split): Unfrozen pane: Width of the left pane(s) (in twips = 1/20 of a point) Frozen pane: Number of visible columns in left pane(s)

    View

    Gets or sets the view setting of the worksheet.

    Declaration
    public SheetView View { get; set; }
    Property Value
    Type Description
    SheetView

    Visibility

    Control visibility of worksheet to end user.

    Declaration
    public WorksheetVisibility Visibility { get; set; }
    Property Value
    Type Description
    WorksheetVisibility

    VPageBreaks

    Gets a VPageBreaksCollection that represents the vertical page breaks on the sheet. Read-only.

    Declaration
    public IVPageBreaks VPageBreaks { get; }
    Property Value
    Type Description
    IVPageBreaks

    Workbook

    Get parent workbook of current worksheet. Read-only.

    Declaration
    public IWorkbook Workbook { get; }
    Property Value
    Type Description
    IWorkbook

    Zoom

    Gets or sets the value that represents zoom factor of document. Value must be in range from 10 till 400.

    Declaration
    public int Zoom { get; set; }
    Property Value
    Type Description
    System.Int32

    Methods

    Activate()

    Makes the current sheet the active sheet. Equivalent to clicking the sheet's tab.

    Declaration
    public void Activate()

    Add(ITabSheet)

    Adds new worksheet to the collection.

    Declaration
    public int Add(ITabSheet sheet)
    Parameters
    Type Name Description
    ITabSheet sheet

    Worksheet to add.

    Returns
    Type Description
    System.Int32

    Index of the added worksheet.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When sheet is Null.

    AdvancedFilter(ExcelFilterAction, IRange, IRange, IRange, Boolean)

    Filters or copies data from a list based on a criteria range..

    Declaration
    public void AdvancedFilter(ExcelFilterAction filterInPlace, IRange filterRange, IRange criteriaRange, IRange copyToRange, bool isUnique)
    Parameters
    Type Name Description
    ExcelFilterAction filterInPlace
    IRange filterRange

    The filter range.

    IRange criteriaRange

    The criteria range.

    IRange copyToRange

    The destination range for the copied rows if ExcelFilterAction is FilterCopy. Otherwise, this argument is ignored.

    System.Boolean isUnique

    True to filter unique records; Otherwise filters all the records that meet the criteria. The default value is False.

    AutofitColumn(Int32)

    Changes the width of the specified column to achieve the best fit.

    Declaration
    public void AutofitColumn(int colIndex)
    Parameters
    Type Name Description
    System.Int32 colIndex

    One-based column index.

    AutofitRow(Int32)

    Changes the height of the specified row to achieve the best fit.

    Declaration
    public void AutofitRow(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    One-based row index.

    Calculate()

    Calculate all the formulas in worksheet.

    Declaration
    public void Calculate()

    ClearData()

    Clears the worksheet data.

    Declaration
    public void ClearData()

    Clone(Object)

    Creates a new object that is a copy of the current instance.

    Declaration
    public override object Clone(object parent)
    Parameters
    Type Name Description
    System.Object parent

    Parent object for a copy of this instance.

    Returns
    Type Description
    System.Object

    A new object that is a copy of this instance.

    Overrides
    Syncfusion.XlsIO.Implementation.Collections.CollectionBaseEx<Syncfusion.XlsIO.IWorksheet>.Clone(System.Object)

    ColumnWidthToPixels(Double)

    Converts the specified column width from points to pixels.

    Declaration
    public int ColumnWidthToPixels(double widthInChars)
    Parameters
    Type Name Description
    System.Double widthInChars

    Width in points.

    Returns
    Type Description
    System.Int32

    Column width in pixels.

    Contains(Int32, Int32)

    Checks whether the specified cell is initialized or accessed.

    Declaration
    public bool Contains(int iRow, int iColumn)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index of the cell.

    System.Int32 iColumn

    One-based column index of the cell.

    Returns
    Type Description
    System.Boolean

    Value indicating whether the cell was initialized or accessed by the user.

    ConvertToImage(Int32, Int32, Int32, Int32)

    Converts the specified range into image. Default image type is Bitmap.

    Declaration
    public Image ConvertToImage(int firstRow, int firstColumn, int lastRow, int lastColumn)
    Parameters
    Type Name Description
    System.Int32 firstRow

    One-based index of the first row to convert.

    System.Int32 firstColumn

    One-based index of the first column to convert.

    System.Int32 lastRow

    One-based index of the last row to convert.

    System.Int32 lastColumn

    One-based index of the last column to convert.

    Returns
    Type Description
    System.Drawing.Image

    Converted Image for the specified range.

    Remarks

    Subscript/Superscript,RTF,Shrink to fit,Shapes (except TextBox shape and Image),Charts and Chart Worksheet and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported

    ConvertToImage(Int32, Int32, Int32, Int32, ImageType, Stream)

    Converts the specified range into image with the specified type.

    Declaration
    public Image ConvertToImage(int firstRow, int firstColumn, int lastRow, int lastColumn, ImageType imageType, Stream stream)
    Parameters
    Type Name Description
    System.Int32 firstRow

    One-based index of the first row to convert.

    System.Int32 firstColumn

    One-based index of the first column to convert.

    System.Int32 lastRow

    One-based index of the last row to convert.

    System.Int32 lastColumn

    One-based index of the last column to convert.

    ImageType imageType

    Type of the image to create.

    System.IO.Stream stream

    Output stream. It is ignored if null.

    Returns
    Type Description
    System.Drawing.Image

    Converted Image for the specified range.

    Remarks

    Subscript/Superscript,RTF,Shrink to fit,Shapes (except TextBox shape and Image),Charts and Chart Worksheet and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported

    ConvertToImage(Int32, Int32, Int32, Int32, ImageType, Stream, EmfType)

    Converts the specified range into image along with Metafile.

    Declaration
    public Image ConvertToImage(int firstRow, int firstColumn, int lastRow, int lastColumn, ImageType imageType, Stream outputStream, EmfType emfType)
    Parameters
    Type Name Description
    System.Int32 firstRow

    One-based index of the first row to convert.

    System.Int32 firstColumn

    One-based index of the first column to convert.

    System.Int32 lastRow

    One-based index of the last row to convert.

    System.Int32 lastColumn

    One-based index of the last column to convert.

    ImageType imageType

    Type of the image to create.

    System.IO.Stream outputStream

    Output stream. It is ignored if null.

    System.Drawing.Imaging.EmfType emfType

    Metafile EmfType.

    Returns
    Type Description
    System.Drawing.Image

    Converted Image for the specified range.

    Remarks

    Subscript/Superscript,RTF,Shrink to fit,Shapes (except TextBox shape and Image),Charts and Chart Worksheet and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported

    ConvertToImage(Int32, Int32, Int32, Int32, EmfType, Stream)

    Converts the specified range into Metafile.

    Declaration
    public Image ConvertToImage(int firstRow, int firstColumn, int lastRow, int lastColumn, EmfType emfType, Stream outputStream)
    Parameters
    Type Name Description
    System.Int32 firstRow

    One-based index of the first row to convert.

    System.Int32 firstColumn

    One-based index of the first column to convert.

    System.Int32 lastRow

    One-based index of the last row to convert.

    System.Int32 lastColumn

    One-based index of the last column to convert.

    System.Drawing.Imaging.EmfType emfType

    Metafile EmfType.

    System.IO.Stream outputStream

    Output stream. It is ignored if null.

    Returns
    Type Description
    System.Drawing.Image

    Converted Image for the specified range.

    Remarks

    Subscript/Superscript,RTF,Shrink to fit,Shapes (except TextBox shape and Image),Charts and Chart Worksheet and Complex conditional formatting features are not supported in Worksheet to image conversion. Gradient fill is partially supported

    CopyToClipboard()

    Copies worksheet data to the clipboard.

    Declaration
    public void CopyToClipboard()

    CreateNamedRanges(String, String, Boolean)

    Creates a named ranges with the specified named range's value as a name for the specified range.

    Declaration
    public void CreateNamedRanges(string namedRange, string referRange, bool vertical)
    Parameters
    Type Name Description
    System.String namedRange

    Existing named ranged.

    System.String referRange

    Address of the named range to be created.

    System.Boolean vertical

    True if the named range values are vertically placed in the sheet.

    Remarks

    This method is used to access the discontinuous ranges.

    CreateRangesCollection()

    Creates a new instance of the IRanges.

    Declaration
    public IRanges CreateRangesCollection()
    Returns
    Type Description
    IRanges

    New instance of ranges collection.

    CreateTemplateMarkersProcessor()

    Create an instance of ITemplateMarkersProcessor that can be used for template markers processing.

    Declaration
    public ITemplateMarkersProcessor CreateTemplateMarkersProcessor()
    Returns
    Type Description
    ITemplateMarkersProcessor

    Object that can be used for template markers processing.

    DeleteColumn(Int32)

    Removes the specified column.

    Declaration
    public void DeleteColumn(int index)
    Parameters
    Type Name Description
    System.Int32 index

    One-based column index.

    DeleteColumn(Int32, Int32)

    Removes the specified number of columns from the given index.

    Declaration
    public void DeleteColumn(int index, int count)
    Parameters
    Type Name Description
    System.Int32 index

    One-based column index.

    System.Int32 count

    Number of columns to remove.

    DeleteRow(Int32)

    Removes specified row (without updating formulas).

    Declaration
    public void DeleteRow(int index)
    Parameters
    Type Name Description
    System.Int32 index

    One-based row index to remove.

    DeleteRow(Int32, Int32)

    Removes specified row (without updating formulas).

    Declaration
    public void DeleteRow(int index, int count)
    Parameters
    Type Name Description
    System.Int32 index

    One-based row index to remove.

    System.Int32 count

    Number of rows to remove.

    DisableSheetCalculations()

    Disables the calculation support in this workbook and disposes of the associative CalcEngine objects.

    Declaration
    public void DisableSheetCalculations()

    EnableSheetCalculations()

    Enables the calculation support.

    Declaration
    public void EnableSheetCalculations()
    Remarks

    Enabling this method will initialize CalcEngine objects and retrieves calculated values of formulas in a worksheet.

    ExportData<T>(Int32, Int32, Int32, Int32)

    Exports worksheet data in the specified row and column and get as a list of CLR objects.

    Declaration
    public List<T> ExportData<T>(int firstRow, int firstColumn, int lastRow, int lastColumn)
        where T : new()
    Parameters
    Type Name Description
    System.Int32 firstRow

    Row of the first cell should be exported.

    System.Int32 firstColumn

    Column of the first cell should be exported.

    System.Int32 lastRow

    LastRow is used to find the upto lastRow of data to export.

    System.Int32 lastColumn

    lastColumn is used to find the upto lastColumn of data to export.

    Returns
    Type Description
    System.Collections.Generic.List<T>

    clrObject List with worksheet data.

    Type Parameters
    Name Description
    T

    ExportData<T>(Int32, Int32, Int32, Int32, Dictionary<String, String>)

    Exports worksheet data in the specified row and column and get as a list of CLR objects.copyran

    Declaration
    public List<T> ExportData<T>(int firstRow, int firstColumn, int lastRow, int lastColumn, Dictionary<string, string> mappingProperties)
        where T : new()
    Parameters
    Type Name Description
    System.Int32 firstRow

    Row of the first cell should be exported.

    System.Int32 firstColumn

    Column of the first cell should be exported.

    System.Int32 lastRow

    LastRow is used to find the upto lastRow of data to export.

    System.Int32 lastColumn

    lastColumn is used to find the upto lastColumn of data to export.

    System.Collections.Generic.Dictionary<System.String, System.String> mappingProperties

    Property names mapping collection. You should give headers as key and properties names as value to the dictionary.

    Returns
    Type Description
    System.Collections.Generic.List<T>

    clrObject List with worksheet data.

    Type Parameters
    Name Description
    T

    ExportDataTable(IRange, ExcelExportDataTableOptions)

    Exports worksheet data in the specified range into a DataTable.

    Declaration
    public DataTable ExportDataTable(IRange dataRange, ExcelExportDataTableOptions options)
    Parameters
    Type Name Description
    IRange dataRange

    Range to export.

    ExcelExportDataTableOptions options

    Export options.

    Returns
    Type Description
    System.Data.DataTable

    DataTable with worksheet data.

    ExportDataTable(Int32, Int32, Int32, Int32, ExcelExportDataTableOptions)

    Exports worksheet data in the specified row and column into a DataTable.

    Declaration
    public DataTable ExportDataTable(int firstRow, int firstColumn, int maxRows, int maxColumns, ExcelExportDataTableOptions options)
    Parameters
    Type Name Description
    System.Int32 firstRow

    Row of the first cell from where DataTable should be exported.

    System.Int32 firstColumn

    Column of the first cell from where DataTable should be exported.

    System.Int32 maxRows

    Maximum number of rows to export.

    System.Int32 maxColumns

    Maximum number of columns to export.

    ExcelExportDataTableOptions options

    Export options.

    Returns
    Type Description
    System.Data.DataTable

    DataTable with worksheet data.

    FindAll(Boolean)

    Returns the cells of the specified bool value.

    Declaration
    public IRange[] FindAll(bool findValue)
    Parameters
    Type Name Description
    System.Boolean findValue

    Value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified bool value, or null if value was not found.

    FindAll(DateTime)

    Returns the cells of the specified DateTime value.

    Declaration
    public IRange[] FindAll(DateTime findValue)
    Parameters
    Type Name Description
    System.DateTime findValue

    Value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified DateTime value, or null if value was not found.

    FindAll(Double, ExcelFindType)

    Returns the cells of the specified double value with the specified ExcelFindType.

    Declaration
    public IRange[] FindAll(double findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.Double findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange[]

    All found cells, or Null if value was not found.

    FindAll(String, ExcelFindType)

    Returns the cells of the specified string value with the specified ExcelFindType.

    Declaration
    public IRange[] FindAll(string findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified string value, or null if value was not found.

    FindAll(String, ExcelFindType, ExcelFindOptions)

    Returns the cells of the specified string value with the specified ExcelFindType and ExcelFindOptions.

    Declaration
    public IRange[] FindAll(string findValue, ExcelFindType flags, ExcelFindOptions findOptions)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    ExcelFindOptions findOptions

    Way to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified string value and specified find options , or null if value was not found.

    FindAll(TimeSpan)

    Returns the cells of the specified TimeSpan value.

    Declaration
    public IRange[] FindAll(TimeSpan findValue)
    Parameters
    Type Name Description
    System.TimeSpan findValue

    Value to search.

    Returns
    Type Description
    IRange[]

    Returns the cells with a specified TimeSpan value, or null if value was not found.

    FindFirst(Boolean)

    Returns the first occurrence of the specified bool value.

    Declaration
    public IRange FindFirst(bool findValue)
    Parameters
    Type Name Description
    System.Boolean findValue

    Value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified bool value, or null if value was not found.

    FindFirst(DateTime)

    Returns the first occurrence of the specified DateTime value.

    Declaration
    public IRange FindFirst(DateTime findValue)
    Parameters
    Type Name Description
    System.DateTime findValue

    Value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified DateTime value, or null if value was not found.

    FindFirst(Double, ExcelFindType)

    Returns the first occurrence of the specified double value with the specified ExcelFindType.

    Declaration
    public IRange FindFirst(double findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.Double findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified double value, or null if value was not found.

    FindFirst(String, ExcelFindType)

    Returns the first occurrence of the specified string value with the specified ExcelFindType.

    Declaration
    public IRange FindFirst(string findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified string value, or null if value was not found.

    FindFirst(String, ExcelFindType, ExcelFindOptions)

    Returns the first occurrence of the specified string value with the specified ExcelFindType and ExcelFindOptions.

    Declaration
    public IRange FindFirst(string findValue, ExcelFindType flags, ExcelFindOptions findOptions)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    ExcelFindOptions findOptions

    Way to search the value.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified string value and specified find options , or null if value was not found.

    FindFirst(TimeSpan)

    Returns the first occurrence of the specified TimeSpan value.

    Declaration
    public IRange FindFirst(TimeSpan findValue)
    Parameters
    Type Name Description
    System.TimeSpan findValue

    Value to search.

    Returns
    Type Description
    IRange

    Returns the first cell with a specified TimeSpan value, or null if value was not found.

    FindStringEndsWith(String, ExcelFindType)

    Returns the first occurrence that ends with the specified string value.

    Declaration
    public IRange FindStringEndsWith(string findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange

    Returns the first occurrence that ends with the specified string value, or null if value was not found.

    FindStringEndsWith(String, ExcelFindType, Boolean)

    Returns the first occurrence that ends with the specified string value which ignores the case.

    Declaration
    public IRange FindStringEndsWith(string findValue, ExcelFindType flags, bool ignoreCase)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    System.Boolean ignoreCase

    True to ignore case when comparing this string to the value; otherwise, False.

    Returns
    Type Description
    IRange

    Returns the first occurrence that ends with the specified string value, or null if value was not found.

    FindStringStartsWith(String, ExcelFindType)

    Returns the first occurrence that starts with the specified string value.

    Declaration
    public IRange FindStringStartsWith(string findValue, ExcelFindType flags)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    Returns
    Type Description
    IRange

    Returns the first occurrence that starts with the specified string value, or null if value was not found.

    FindStringStartsWith(String, ExcelFindType, Boolean)

    Returns the first occurrence that starts with the specified string value which ignores the case.

    Declaration
    public IRange FindStringStartsWith(string findValue, ExcelFindType flags, bool ignoreCase)
    Parameters
    Type Name Description
    System.String findValue

    Value to search.

    ExcelFindType flags

    Type of value to search.

    System.Boolean ignoreCase

    true to ignore case wen comparing this string to the value;otherwise,false

    Returns
    Type Description
    IRange

    Returns the first occurrence that starts with the specified string value, or null if value was not found.

    FreeRange(IRange)

    Frees range object.

    Declaration
    public void FreeRange(IRange range)
    Parameters
    Type Name Description
    IRange range

    Range to remove from internal cache.

    FreeRange(Int32, Int32)

    Frees range object for the specified row and column.

    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.

    GetBoolean(Int32, Int32)

    Returns bool value from the specified row and column.

    Declaration
    public bool GetBoolean(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.Boolean

    Returns found bool value. If cannot found returns false.

    GetColumnWidth(Int32)

    Returns the width of the specified column.

    Declaration
    public double GetColumnWidth(int iColumnIndex)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index.

    Returns
    Type Description
    System.Double

    Width of the specified column.

    GetColumnWidthInPixels(Int32)

    Returns the width of the specified column in pixels.

    Declaration
    public int GetColumnWidthInPixels(int iColumnIndex)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index.

    Returns
    Type Description
    System.Int32

    Width in pixels of the specified column.

    GetDefaultColumnStyle(Int32)

    Returns the default column style for the specified column.

    Declaration
    public IStyle GetDefaultColumnStyle(int iColumnIndex)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index.

    Returns
    Type Description
    IStyle

    Default column style for the specified column or null if style wasn't set.

    GetDefaultRowStyle(Int32)

    Returns default row style for the specified row.

    Declaration
    public IStyle GetDefaultRowStyle(int iRowIndex)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    One-based row index.

    Returns
    Type Description
    IStyle

    Default row style for the specified row or null if style wasn't set.

    GetError(Int32, Int32)

    Returns error value from the specified row and column.

    Declaration
    public string GetError(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.String

    Returns error value or null.

    GetFormula(Int32, Int32, Boolean)

    Returns formula value from specified row and column.

    Declaration
    public string GetFormula(int row, int column, bool bR1C1)
    Parameters
    Type Name Description
    System.Int32 row

    One-based row index.

    System.Int32 column

    One-based column index.

    System.Boolean bR1C1

    Indicates whether R1C1 notation should be used.

    Returns
    Type Description
    System.String

    Returns formula string.

    GetFormulaBoolValue(Int32, Int32)

    Returns formula bool value from the specified row and column.

    Declaration
    public bool GetFormulaBoolValue(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.Boolean

    True if bool value is found. otherwise False.

    GetFormulaErrorValue(Int32, Int32)

    Returns formula error value from the specified row and column.

    Declaration
    public string GetFormulaErrorValue(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.String

    Returns error value or null.

    GetFormulaNumberValue(Int32, Int32)

    Returns formula number value from the specified row and column.

    Declaration
    public double GetFormulaNumberValue(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.Double

    Number contained by the cell.

    GetFormulaStringValue(Int32, Int32)

    Returns formula string value from the specified row and column.

    Declaration
    public string GetFormulaStringValue(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.String

    String contained by the cell.

    GetNumber(Int32, Int32)

    Returns number value from the specified row and column.

    Declaration
    public double GetNumber(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.Double

    Number contained by the cell.

    GetRowHeight(Int32)

    Returns the height of the specified row.

    Declaration
    public double GetRowHeight(int iRowIndex)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    One-based row index.

    Returns
    Type Description
    System.Double

    Returns height of the specified row. Otherwise returns StandardHeight.

    Remarks

    Otherwise it gets the StandardHeight

    GetRowHeightInPixels(Int32)

    Returns the height of the specified row in pixels.

    Declaration
    public int GetRowHeightInPixels(int iRowIndex)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    One-based row index.

    Returns
    Type Description
    System.Int32

    Returns height of the specified row in pixels. Otherwise returns StandardHeight.

    Remarks

    Otherwise it gets the StandardHeight in pixels

    GetText(Int32, Int32)

    Returns string value from the specified row and column.

    Declaration
    public string GetText(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.String

    String contained by the cell.

    GetValueRowCol(Int32, Int32)

    Returns the formula string if the cell contains a formula, or the value if the cell cantains anything other than a formula.

    Declaration
    public object GetValueRowCol(int row, int col)
    Parameters
    Type Name Description
    System.Int32 row

    The row of the cell.

    System.Int32 col

    The column of the cell.

    Returns
    Type Description
    System.Object

    The formula string or value.

    HideColumn(Int32)

    Hides the specified column.

    Declaration
    public void HideColumn(int columnIndex)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    One-based column index.

    HideRow(Int32)

    Hides the specified row.

    Declaration
    public void HideRow(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    One-based row index.

    ImportArray(DateTime[], Int32, Int32, Boolean)

    Imports an array of DateTime values into a worksheet.

    Declaration
    public int ImportArray(DateTime[] arrDateTime, int firstRow, int firstColumn, bool isVertical)
    Parameters
    Type Name Description
    System.DateTime[] arrDateTime

    Array of datetime value.

    System.Int32 firstRow

    Row of the first cell where array should be imported.

    System.Int32 firstColumn

    Column of the first cell where array should be imported.

    System.Boolean isVertical

    True if array should be imported vertically; False - horizontally.

    Returns
    Type Description
    System.Int32

    Number of imported elements.

    ImportArray(Double[], Int32, Int32, Boolean)

    Imports an array of double values into a worksheet.

    Declaration
    public int ImportArray(double[] arrDouble, int firstRow, int firstColumn, bool isVertical)
    Parameters
    Type Name Description
    System.Double[] arrDouble

    Array of double value.

    System.Int32 firstRow

    Row of the first cell where array should be imported.

    System.Int32 firstColumn

    Column of the first cell where array should be imported.

    System.Boolean isVertical

    True if array should be imported vertically; False - horizontally.

    Returns
    Type Description
    System.Int32

    Number of imported elements.

    ImportArray(Int32[], Int32, Int32, Boolean)

    Imports an array of integer values into a worksheet.

    Declaration
    public int ImportArray(int[] arrInt, int firstRow, int firstColumn, bool isVertical)
    Parameters
    Type Name Description
    System.Int32[] arrInt

    Array of int value.

    System.Int32 firstRow

    Row of the first cell where array should be imported.

    System.Int32 firstColumn

    Column of the first cell where array should be imported.

    System.Boolean isVertical

    True if array should be imported vertically; False - horizontally.

    Returns
    Type Description
    System.Int32

    Number of imported elements.

    ImportArray(Object[], Int32, Int32, Boolean)

    Imports an array of objects into a worksheet with specified alignment.

    Declaration
    public int ImportArray(object[] arrObject, int firstRow, int firstColumn, bool isVertical)
    Parameters
    Type Name Description
    System.Object[] arrObject

    Array of object.

    System.Int32 firstRow

    Row of the first cell where array should be imported.

    System.Int32 firstColumn

    Column of the first cell where array should be imported.

    System.Boolean isVertical

    True if array should be imported vertically; False - horizontally.

    Returns
    Type Description
    System.Int32

    Number of imported elements.

    ImportArray(Object[,], Int32, Int32)

    Imports an array of objects into a worksheet.

    Declaration
    public int ImportArray(object[, ] arrObject, int firstRow, int firstColumn)
    Parameters
    Type Name Description
    System.Object[,] arrObject

    Array of object.

    System.Int32 firstRow

    Row of the first cell where array should be imported.

    System.Int32 firstColumn

    Column of the first cell where array should be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportArray(String[], Int32, Int32, Boolean)

    Imports an array of string values into a worksheet.

    Declaration
    public int ImportArray(string[] arrString, int firstRow, int firstColumn, bool isVertical)
    Parameters
    Type Name Description
    System.String[] arrString

    Array of string value.

    System.Int32 firstRow

    Row of the first cell where array should be imported.

    System.Int32 firstColumn

    Column of the first cell where array should be imported.

    System.Boolean isVertical

    True if array should be imported vertically; False - horizontally.

    Returns
    Type Description
    System.Int32

    Number of imported elements.

    ImportData(IEnumerable, ExcelImportDataOptions)

    Imports data from class objects into a worksheet with specified row and column along with import data options.

    Declaration
    public int ImportData(IEnumerable arrObject, ExcelImportDataOptions importDataOptions)
    Parameters
    Type Name Description
    System.Collections.IEnumerable arrObject

    IEnumerable object with desired data.

    ExcelImportDataOptions importDataOptions

    Import data options for when importing nested collection data.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportData(IEnumerable, Int32, Int32, Boolean)

    Imports data from class objects into a worksheet with specified row and column.

    Declaration
    public int ImportData(IEnumerable arrObject, int firstRow, int firstColumn, bool includeHeader)
    Parameters
    Type Name Description
    System.Collections.IEnumerable arrObject

    IEnumerable object with desired data.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Boolean includeHeader

    TRUE if class properties names must be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportDataColumn(DataColumn, Boolean, Int32, Int32)

    Imports data from a DataColumn into a worksheet.

    Declaration
    public int ImportDataColumn(DataColumn dataColumn, bool isFieldNameShown, int firstRow, int firstColumn)
    Parameters
    Type Name Description
    System.Data.DataColumn dataColumn

    DataColumn with desired data.

    System.Boolean isFieldNameShown

    True if column name must be imported.

    System.Int32 firstRow

    Row of the first cell where Data Table should be imported.

    System.Int32 firstColumn

    Column of the first cell where Data Table should be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportDataColumn(DataColumn, Boolean, Int32, Int32, Boolean)

    Imports data from a DataColumn into a worksheet.

    Declaration
    public int ImportDataColumn(DataColumn dataColumn, bool isFieldNameShown, int firstRow, int firstColumn, bool preserveTypes)
    Parameters
    Type Name Description
    System.Data.DataColumn dataColumn

    DataColumn with desired data.

    System.Boolean isFieldNameShown

    True if column name must be imported.

    System.Int32 firstRow

    Row of the first cell where Data Table should be imported.

    System.Int32 firstColumn

    Column of the first cell where Data Table should be imported.

    System.Boolean preserveTypes

    Indicates whether XlsIO should preserve column types from DataTable. By default, preserve type is FALSE. i.e., Setting it to True will import data based on column type, otherwise will import based on value type.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportDataGrid(DataGrid, Int32, Int32, Boolean, Boolean)

    Imports data from MS DataGrid (web) into worksheet.

    Declaration
    public void ImportDataGrid(DataGrid dataGrid, int firstRow, int firstColumn, bool isImportHeader, bool isImportStyle)
    Parameters
    Type Name Description
    System.Web.UI.WebControls.DataGrid dataGrid

    DataGrid with datasource.

    System.Int32 firstRow

    Represents the first row of the worksheet to import.

    System.Int32 firstColumn

    Represents the first column of the worksheet to import.

    System.Boolean isImportHeader

    TRUE if header must be imported. FALSE otherwise.

    System.Boolean isImportStyle

    TRUE if row style must be imported. FALSE otherwise.

    ImportDataGrid(DataGrid, Int32, Int32, Boolean, Boolean)

    Imports data from MS DataGrid into worksheet.

    Declaration
    public void ImportDataGrid(DataGrid dataGrid, int firstRow, int firstColumn, bool isImportHeader, bool isImportStyle)
    Parameters
    Type Name Description
    System.Windows.Forms.DataGrid dataGrid

    DataGrid with datasource.

    System.Int32 firstRow

    Represents the first row of the worksheet to import.

    System.Int32 firstColumn

    Represents the first column of the worksheet to import.

    System.Boolean isImportHeader

    TRUE if header must be imported. FALSE otherwise.

    System.Boolean isImportStyle

    TRUE if row style must be imported. FALSE otherwise.

    ImportDataGridView(DataGridView, Int32, Int32, Boolean, Boolean)

    Imports data from MS DataGridView into worksheet.

    Declaration
    public void ImportDataGridView(DataGridView dataGridView, int firstRow, int firstColumn, bool isImportHeader, bool isImportStyle)
    Parameters
    Type Name Description
    System.Windows.Forms.DataGridView dataGridView

    DataGridView with datasource.

    System.Int32 firstRow

    Represents the first row of the worksheet to import.

    System.Int32 firstColumn

    Represents the first column of the worksheet to import.

    System.Boolean isImportHeader

    TRUE if header must be imported. FALSE otherwise.

    System.Boolean isImportStyle

    TRUE if row style must be imported. FALSE otherwise.

    ImportDataReader(IDataReader, IName, Boolean)

    Declaration
    public int ImportDataReader(IDataReader dataReader, IName namedRange, bool isFieldNameShown)
    Parameters
    Type Name Description
    System.Data.IDataReader dataReader
    IName namedRange
    System.Boolean isFieldNameShown
    Returns
    Type Description
    System.Int32

    ImportDataReader(IDataReader, Boolean, Int32, Int32)

    Imports data from DataReader into worksheet from the specified row and column.

    Declaration
    public int ImportDataReader(IDataReader dataReader, bool isFieldNameShown, int firstRow, int firstColumn)
    Parameters
    Type Name Description
    System.Data.IDataReader dataReader

    The System.Data.SqlClient.SqlDataReader or System.Data.OleDb.OleDbDataReader object which contains data.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is not supported in WinRT, Windows Phone, Portable, Universal and Silverlight platforms.

    ImportDataReader(IDataReader, Boolean, Int32, Int32, Boolean)

    Imports data from DataReader into worksheet from the specified row and column along with the preserve type.

    Declaration
    public int ImportDataReader(IDataReader dataReader, bool isFieldNameShown, int firstRow, int firstColumn, bool preserveTypes)
    Parameters
    Type Name Description
    System.Data.IDataReader dataReader

    The System.Data.SqlClient.SqlDataReader or System.Data.OleDb.OleDbDataReader object which contains data.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Boolean preserveTypes

    Indicates whether XlsIO should preserve column types from DataReader. By default, preserve type is FALSE. i.e., Setting it to True will import data based on column type, otherwise will import based on value type.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is not supported in WinRT, Windows Phone, Portable, Universal and Silverlight platforms.

    ImportDataReader(IDataReader, Int32, Int32, Boolean)

    Imports data from DataReader into worksheet from the specified row and column along with save option.

    Declaration
    public int ImportDataReader(IDataReader dataReader, int firstRow, int firstColumn, bool importOnSave)
    Parameters
    Type Name Description
    System.Data.IDataReader dataReader

    The System.Data.SqlClient.SqlDataReader or System.Data.OleDb.OleDbDataReader object which contains data.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Boolean importOnSave

    TRUE if data must be serialized directly on save.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is not supported in WinRT, Windows Phone, Portable, Universal and Silverlight platforms.

    ImportDataTable(DataTable, IName, Boolean)

    Imports data from DataTable into the specified NamedRange of current worksheet.

    Declaration
    public int ImportDataTable(DataTable dataTable, IName namedRange, bool isFieldNameShown)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    Data Table with desired data.

    IName namedRange

    Represents named range.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, IName, Boolean, Int32, Int32)

    Imports data from DataTable into the specified NamedRange of current worksheet with row and column offset.

    Declaration
    public int ImportDataTable(DataTable dataTable, IName namedRange, bool isFieldNameShown, int rowOffset, int columnOffset)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    Data Table with desired data.

    IName namedRange

    Represents named range.

    System.Boolean isFieldNameShown

    TRUE if column names must also be imported.

    System.Int32 rowOffset

    Represents row offset into named range to import.

    System.Int32 columnOffset

    Represents column offset into named range to import.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, IName, Boolean, Int32, Int32, Int32, Int32)

    Imports data from DataTable into the specified NamedRange of current worksheet with row and column offset.

    Declaration
    public int ImportDataTable(DataTable dataTable, IName namedRange, bool isFieldNameShown, int rowOffset, int columnOffset, int iMaxRow, int iMaxCol)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    DataTable with desired data.

    IName namedRange

    Represents named range.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    System.Int32 rowOffset

    Represents row offset into named range to import.

    System.Int32 columnOffset

    Represents column offset into named range to import.

    System.Int32 iMaxRow

    Maximum number of rows to import.

    System.Int32 iMaxCol

    Maximum number of columns to import.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, IName, Boolean, Int32, Int32, Int32, Int32, Boolean)

    Imports data from DataReader into the specified NamedRange of current worksheet with row and column offset.

    Declaration
    public int ImportDataTable(DataTable dataTable, IName namedRange, bool isFieldNameShown, int rowOffset, int columnOffset, int iMaxRow, int iMaxCol, bool bPreserveTypes)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    DataTable with desired data.

    IName namedRange

    Represents named range.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    System.Int32 rowOffset

    Represents row offset into named range to import.

    System.Int32 columnOffset

    Represents column offset into named range to import.

    System.Int32 iMaxRow

    Maximum number of rows to import.

    System.Int32 iMaxCol

    Maximum number of columns to import.

    System.Boolean bPreserveTypes
    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, Boolean, Int32, Int32)

    Declaration
    public int ImportDataTable(DataTable dataTable, bool isFieldNameShown, int firstRow, int firstColumn)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable
    System.Boolean isFieldNameShown
    System.Int32 firstRow
    System.Int32 firstColumn
    Returns
    Type Description
    System.Int32

    ImportDataTable(DataTable, Boolean, Int32, Int32, Boolean)

    Imports data from a DataTable into a worksheet with specified row and column along with the preserve type.

    Declaration
    public int ImportDataTable(DataTable dataTable, bool isFieldNameShown, int firstRow, int firstColumn, bool preserveTypes)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    DataTable with desired data.

    System.Boolean isFieldNameShown

    True if column names must be imported.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Boolean preserveTypes

    Indicates whether XlsIO should preserve column types from DataTable. By default, preserve type is FALSE. i.e., Setting it to True will import data based on column type, otherwise will import based on value type.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, Boolean, Int32, Int32, Int32, Int32)

    Imports data from a DataTable into a worksheet with the specified range.

    Declaration
    public int ImportDataTable(DataTable dataTable, bool isFieldNameShown, int firstRow, int firstColumn, int maxRows, int maxColumns)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    DataTable with desired data.

    System.Boolean isFieldNameShown

    True if column names must be imported.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Int32 maxRows

    Maximum number of rows to import.

    System.Int32 maxColumns

    Maximum number of columns to import.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, Boolean, Int32, Int32, Int32, Int32, Boolean)

    Imports data from a DataTable into a worksheet with specified range along with the specified preserve type.

    Declaration
    public int ImportDataTable(DataTable dataTable, bool isFieldNameShown, int firstRow, int firstColumn, int maxRows, int maxColumns, bool preserveTypes)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    DataTable with desired data.

    System.Boolean isFieldNameShown

    True if column names must be imported.

    System.Int32 firstRow

    First row from where the data should be imported.

    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Int32 maxRows

    Maximum number of rows to import.

    System.Int32 maxColumns

    Maximum number of columns to import.

    System.Boolean preserveTypes

    Indicates whether XlsIO should preserve column types from DataTable. By default, preserve type is FALSE. i.e., Setting it to True will import data based on column type, otherwise will import based on value type.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, Int32, Int32, Boolean)

    Imports data from a DataTable into a worksheet with the specified row and column along with save option.

    Declaration
    public int ImportDataTable(DataTable dataTable, int firtRow, int firstColumn, bool importOnSave)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    Data Table with desired data.

    System.Int32 firtRow
    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Boolean importOnSave

    TRUE if data table must be serialized directly on save.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataTable(DataTable, Int32, Int32, Boolean, Boolean)

    Imports data from a DataTable into a worksheet with the specified row and column along with save option.

    Declaration
    public int ImportDataTable(DataTable dataTable, int firtRow, int firstColumn, bool importOnSave, bool includeHeader)
    Parameters
    Type Name Description
    System.Data.DataTable dataTable

    Data Table with desired data.

    System.Int32 firtRow
    System.Int32 firstColumn

    First column from where the data should be imported.

    System.Boolean importOnSave

    TRUE if data table must be serialized directly on save.

    System.Boolean includeHeader

    TRUE if column names must be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    Remarks

    This method is supported on Windows Forms, WPF, ASP.NET and ASP.NET MVC platforms only.

    ImportDataView(DataView, Boolean, Int32, Int32)

    Imports data from a DataView into worksheet with the specified row and column.

    Declaration
    public int ImportDataView(DataView dataView, bool isFieldNameShown, int firstRow, int firstColumn)
    Parameters
    Type Name Description
    System.Data.DataView dataView

    DataView with desired data.

    System.Boolean isFieldNameShown

    TRUE if column names must also be imported.

    System.Int32 firstRow

    Row of the first cell where Data View should be imported.

    System.Int32 firstColumn

    Column of the first cell where Data View should be imported.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportDataView(DataView, Boolean, Int32, Int32, Boolean)

    Imports data from a DataView into a worksheet with the specified range and preserve type.

    Declaration
    public int ImportDataView(DataView dataView, bool isFieldNameShown, int firstRow, int firstColumn, bool bPreserveTypes)
    Parameters
    Type Name Description
    System.Data.DataView dataView

    DataView with desired data.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    System.Int32 firstRow

    Row of the first cell where DataView should be imported.

    System.Int32 firstColumn

    Column of the first cell where DataView should be imported.

    System.Boolean bPreserveTypes

    Indicates whether to preserve column types.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportDataView(DataView, Boolean, Int32, Int32, Int32, Int32)

    Imports data from a DataView into a worksheet with specified row, column and preserve type.

    Declaration
    public int ImportDataView(DataView dataView, bool isFieldNameShown, int firstRow, int firstColumn, int maxRows, int maxColumns)
    Parameters
    Type Name Description
    System.Data.DataView dataView

    Data View with desired data.

    System.Boolean isFieldNameShown

    TRUE if column names must be imported.

    System.Int32 firstRow

    Row of the first cell where DataView should be imported.

    System.Int32 firstColumn

    Column of the first cell where DataView should be imported.

    System.Int32 maxRows

    Maximum number of rows to import.

    System.Int32 maxColumns

    Maximum number of columns to import.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportDataView(DataView, Boolean, Int32, Int32, Int32, Int32, Boolean)

    Imports data from a DataView into a worksheet with specified range and preserve type.

    Declaration
    public int ImportDataView(DataView dataView, bool isFieldNameShown, int firstRow, int firstColumn, int maxRows, int maxColumns, bool bPreserveTypes)
    Parameters
    Type Name Description
    System.Data.DataView dataView

    DataView with desired data.

    System.Boolean isFieldNameShown

    TRUE if column names must also be imported.

    System.Int32 firstRow

    Row of the first cell where DataView should be imported.

    System.Int32 firstColumn

    Column of the first cell where DataView should be imported.

    System.Int32 maxRows

    Maximum number of rows to import.

    System.Int32 maxColumns

    Maximum number of columns to import.

    System.Boolean bPreserveTypes

    Indicates whether XlsIO should try to preserve types in Data Table, i.e. if it is set to False (default) and in Data Table we have in string column value that contains only numbers, it would be converted to number.

    Returns
    Type Description
    System.Int32

    Number of imported rows.

    ImportGridView(GridView, Int32, Int32, Boolean, Boolean)

    Imports data from MS GridView into worksheet.

    Declaration
    public void ImportGridView(GridView gridView, int firstRow, int firstColumn, bool isImportHeader, bool isImportStyle)
    Parameters
    Type Name Description
    System.Web.UI.WebControls.GridView gridView

    GridView with datasource.

    System.Int32 firstRow

    Represents the first row of the worksheet to import.

    System.Int32 firstColumn

    Represents the first column of the worksheet to import.

    System.Boolean isImportHeader

    TRUE if header must be imported. FALSE otherwise.

    System.Boolean isImportStyle

    TRUE if row style must be imported. FALSE otherwise.

    ImportHtmlTable(Stream, Int32, Int32)

    Imports HTML table of a file stream into worksheet from the specified row and column.

    Declaration
    public void ImportHtmlTable(Stream fileStream, int row, int column)
    Parameters
    Type Name Description
    System.IO.Stream fileStream

    Specifies the HTML filestream.

    System.Int32 row

    Specifies the starting row index.

    System.Int32 column

    Specifies the starting column index.

    Examples

    The following code illustrates how to convert HTML table to Excel.

    ExcelEngine excelEngine = new ExcelEngine();
    IApplication application = excelEngine.Excel;
    application.DefaultVersion = ExcelVersion.Excel2013;
    IWorkbook workbook = application.Workbooks.Create(1);
    
    IWorksheet sheet = workbook.Worksheets[0];
    FileStream html = new FileStream("HTMLtable.html", FileMode.Open, FileAccess.ReadWrite);
    
    sheet.ImportHtmlTable(html, 1, 1);
    
    workbook.SaveAs("HTMLToExcel.xlsx");
    workbook.Close();
    excelEngine.Dispose();

    ImportHtmlTable(Stream, Int32, Int32, HtmlImportOptions)

    Imports HTML table of a file stream into worksheet from the specified row and column.

    Declaration
    public void ImportHtmlTable(Stream fileStream, int row, int column, HtmlImportOptions htmlImportOptions)
    Parameters
    Type Name Description
    System.IO.Stream fileStream

    Specifies the HTML filestream.

    System.Int32 row

    Specifies the starting row index.

    System.Int32 column

    Specifies the starting column index.

    HtmlImportOptions htmlImportOptions

    Specifies the html import options.

    Examples

    The following code illustrates how to convert HTML table to Excel.

    ExcelEngine excelEngine = new ExcelEngine();
    IApplication application = excelEngine.Excel;
    application.DefaultVersion = ExcelVersion.Xlsx;
    IWorkbook workbook = application.Workbooks.Create(1);
    
    IWorksheet sheet = workbook.Worksheets[0];
    FileStream html = new FileStream("HTMLtable.html", FileMode.Open, FileAccess.ReadWrite);
    
    sheet.ImportHtmlTable(html, 1, 1, HtmlImportOptions.DetectFormulas);
    
    workbook.SaveAs("HTMLToExcel.xlsx");
    workbook.Close();
    excelEngine.Dispose();

    ImportHtmlTable(String, Int32, Int32)

    Imports HTML table of a HTML file into worksheet from the specified row and column.

    Declaration
    public void ImportHtmlTable(string fileName, int row, int column)
    Parameters
    Type Name Description
    System.String fileName

    Specifies the HTML file.

    System.Int32 row

    Specifies the starting row index.

    System.Int32 column

    Specifies the starting column index.

    Examples

    The following code illustrates how to convert HTML table to Excel.

    ExcelEngine excelEngine = new ExcelEngine();
    IApplication application = excelEngine.Excel;
    application.DefaultVersion = ExcelVersion.Excel2013;
    IWorkbook workbook = application.Workbooks.Create(1);
    
    IWorksheet sheet = workbook.Worksheets[0];
    
    sheet.ImportHtmlTable("HTMLtable.html", 1, 1);
    
    workbook.SaveAs("HTMLToExcel.xlsx");
    workbook.Close();
    excelEngine.Dispose();

    ImportHtmlTable(String, Int32, Int32, HtmlImportOptions)

    Imports tables from HTML document into Excel worksheet from the specified row and column with HTML import options.

    Declaration
    public void ImportHtmlTable(string fileName, int row, int column, HtmlImportOptions htmlImportOptions)
    Parameters
    Type Name Description
    System.String fileName

    Specifies the HTML file.

    System.Int32 row

    Specifies the starting row index.

    System.Int32 column

    Specifies the starting column index.

    HtmlImportOptions htmlImportOptions

    Specifies the html import options.

    Examples

    The following code illustrates how to convert HTML table to Excel.

    ExcelEngine excelEngine = new ExcelEngine();
    IApplication application = excelEngine.Excel;
    application.DefaultVersion = ExcelVersion.Xlsx;
    IWorkbook workbook = application.Workbooks.Create(1);
    
    IWorksheet sheet = workbook.Worksheets[0];
    
    sheet.ImportHtmlTable("HTMLtable.html", 1, 1, HtmlImportOptions.DetectFormulas);
    
    workbook.SaveAs("HTMLToExcel.xlsx");
    workbook.Close();
    excelEngine.Dispose();

    InsertColumn(Int32)

    Inserts an empty column for the specified column index.

    Declaration
    public void InsertColumn(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index at which new column should be inserted.

    InsertColumn(Int32, Int32)

    Inserts an empty column in the specified column index based on column count.

    Declaration
    public void InsertColumn(int iColumnIndex, int iColumnCount)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    Index at which new column should be inserted.

    System.Int32 iColumnCount

    Number of columns to insert.

    InsertColumn(Int32, Int32, ExcelInsertOptions)

    Inserts an empty column with default formatting (without formulas update).

    Declaration
    public void InsertColumn(int iColumnIndex, int iColumnCount, ExcelInsertOptions options)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    Index at which new column should be inserted.

    System.Int32 iColumnCount

    Number of columns to insert.

    ExcelInsertOptions options

    Insert options.

    InsertRow(Int32)

    Inserts an empty row in the specified row index.

    Declaration
    public void InsertRow(int index)
    Parameters
    Type Name Description
    System.Int32 index

    Index at which new row should be inserted.

    InsertRow(Int32, Int32)

    Inserts an empty rows in the specified row index based on row count.

    Declaration
    public void InsertRow(int iRowIndex, int iRowCount)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    Index at which new row should be inserted.

    System.Int32 iRowCount

    Number of rows to insert.

    InsertRow(Int32, Int32, ExcelInsertOptions)

    Inserts an empty row in the specified row index with specified ExcelInsertOptions based on row count.

    Declaration
    public void InsertRow(int iRowIndex, int iRowCount, ExcelInsertOptions insertOptions)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    Index at which new row should be inserted.

    System.Int32 iRowCount

    Number of rows to insert.

    ExcelInsertOptions insertOptions

    Insert options.

    IntersectRanges(IRange, IRange)

    Intersects two ranges.

    Declaration
    public IRange IntersectRanges(IRange range1, IRange range2)
    Parameters
    Type Name Description
    IRange range1

    First range to intersect.

    IRange range2

    Second range to intersect.

    Returns
    Type Description
    IRange

    Intersection of two ranges or NULL if there is no range intersection.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When range1 or range2 is NULL.

    IsColumnVisible(Int32)

    Returns True if the specified column is visible to end user.

    Declaration
    public bool IsColumnVisible(int columnIndex)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    One-based column index.

    Returns
    Type Description
    System.Boolean

    True if column is visible; otherwise, False.

    IsRowVisible(Int32)

    Returns True if the specified row is visible to end user.

    Declaration
    public bool IsRowVisible(int rowIndex)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    One-based row index.

    Returns
    Type Description
    System.Boolean

    True if row is visible; otherwise, False.

    MergeRanges(IRange, IRange)

    Merges two ranges.

    Declaration
    public IRange MergeRanges(IRange range1, IRange range2)
    Parameters
    Type Name Description
    IRange range1

    First range to merge.

    IRange range2

    Second range to merge.

    Returns
    Type Description
    IRange

    Merged ranges or NULL if is not able to merge ranges.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When range1 or range2 is NULL.

    Move(Int32)

    Moves worksheet to the specified index.

    Declaration
    public void Move(int iNewIndex)
    Parameters
    Type Name Description
    System.Int32 iNewIndex

    New index of the worksheet.

    OnClear()

    Performs additional operations before the Clear method.

    Declaration
    protected override void OnClear()
    Overrides
    Syncfusion.XlsIO.Implementation.Collections.CollectionBaseEx<Syncfusion.XlsIO.IWorksheet>.OnClear()

    OnValueChanged(Int32, Int32, String)

    Raises the ValueChanged event.

    Declaration
    public void OnValueChanged(int row, int col, string value)
    Parameters
    Type Name Description
    System.Int32 row

    The row of the change.

    System.Int32 col

    The column of the change.

    System.String value

    The changed value.

    PEExportDataTable(IRange, ExcelExportDataTableOptions, PivotTableImpl)

    Exports worksheet data into a DataTable only for Pivot engine.

    Declaration
    public DataTable PEExportDataTable(IRange dataRange, ExcelExportDataTableOptions options, PivotTableImpl pivotTable)
    Parameters
    Type Name Description
    IRange dataRange

    Range to export.

    ExcelExportDataTableOptions options

    Export options.

    PivotTableImpl pivotTable
    Returns
    Type Description
    System.Data.DataTable

    DataTable with worksheet data.

    PixelsToColumnWidth(Int32)

    Converts the specified column width from pixels to points.

    Declaration
    public double PixelsToColumnWidth(int pixels)
    Parameters
    Type Name Description
    System.Int32 pixels

    Width in pixels.

    Returns
    Type Description
    System.Double

    Width in points.

    Protect(String)

    Protects worksheet's content with password.

    Declaration
    public void Protect(string password)
    Parameters
    Type Name Description
    System.String password

    Password to protect with.

    Protect(String, ExcelSheetProtection)

    Protects current worksheet.

    Declaration
    public void Protect(string password, ExcelSheetProtection options)
    Parameters
    Type Name Description
    System.String password

    Represents password to protect.

    ExcelSheetProtection options

    Represents params to protect.

    Remove()

    Removes worksheet from parent worksheet collection.

    Declaration
    public void Remove()

    Remove(ITabSheet)

    Removes worksheet from the collection.

    Declaration
    public void Remove(ITabSheet sheet)
    Parameters
    Type Name Description
    ITabSheet sheet

    Worksheet to remove.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When sheet is Null.

    RemovePanes()

    Removes panes from a worksheet.

    Declaration
    public void RemovePanes()

    Replace(String, DataColumn, Boolean)

    Replaces string with the specified datacolumn value.

    Declaration
    public void Replace(string oldValue, DataColumn newValues, bool isFieldNamesShown)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.Data.DataColumn newValues

    Data table with new data.

    System.Boolean isFieldNamesShown

    Indicates whether field name must be shown.

    Replace(String, DataTable, Boolean)

    Replaces string with the specified datatable value.

    Declaration
    public void Replace(string oldValue, DataTable newValues, bool isFieldNamesShown)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.Data.DataTable newValues

    Data table with new data.

    System.Boolean isFieldNamesShown

    Indicates whether field name must be shown.

    Replace(String, DateTime)

    Replaces the string with the specified DateTime value.

    Declaration
    public void Replace(string oldValue, DateTime newValue)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.DateTime newValue

    The DateTime to replace all occurrences of oldValue.

    Replace(String, Double)

    Replaces string with the specified double value.

    Declaration
    public void Replace(string oldValue, double newValue)
    Parameters
    Type Name Description
    System.String oldValue

    String value to replace.

    System.Double newValue

    The string to replace all occurrences of oldValue.

    Replace(String, Double[], Boolean)

    Replaces specified string with the specified array of double values.

    Declaration
    public void Replace(string oldValue, double[] newValues, bool isVertical)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.Double[] newValues

    Array of new values.

    System.Boolean isVertical

    Indicates whether array should be inserted vertically.

    Replace(String, Int32[], Boolean)

    Replaces specified string with the specified array of int values.

    Declaration
    public void Replace(string oldValue, int[] newValues, bool isVertical)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.Int32[] newValues

    Array of new values.

    System.Boolean isVertical

    Indicates whether array should be inserted vertically.

    Replace(String, String)

    Replaces string with the specified another string value.

    Declaration
    public void Replace(string oldValue, string newValue)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.String newValue

    The string to replace all occurrences of oldValue.

    Replace(String, String, ExcelFindOptions)

    Replaces string with the specified string value based on the given ExcelFindOptions.

    Declaration
    public void Replace(string oldValue, string newValue, ExcelFindOptions findOptions)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.String newValue

    The string to replace all occurrences of oldValue.

    ExcelFindOptions findOptions

    Specifies the find options for the oldValue.

    Replace(String, String[], Boolean)

    Replaces specified string with the specified array of string values.

    Declaration
    public void Replace(string oldValue, string[] newValues, bool isVertical)
    Parameters
    Type Name Description
    System.String oldValue

    The string to be replaced.

    System.String[] newValues

    Array of new values.

    System.Boolean isVertical

    Indicates whether array should be inserted vertically.

    SaveAs(Stream, String)

    Saves worksheet as stream using separator. Used only for CSV files.

    Declaration
    public void SaveAs(Stream stream, string separator)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream to save.

    System.String separator

    Current separator.

    SaveAs(Stream, String, Encoding)

    Saves worksheet as stream using separator with specified encoding. Used only for CSV files.

    Declaration
    public void SaveAs(Stream stream, string separator, Encoding encoding)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream to save.

    System.String separator

    Current separator.

    System.Text.Encoding encoding

    Encoding to use.

    SaveAs(String, String)

    Saves worksheet with specified file name using separator. Used only for CSV files.

    Declaration
    public void SaveAs(string fileName, string separator)
    Parameters
    Type Name Description
    System.String fileName

    File to save.

    System.String separator

    Current separator.

    SaveAs(String, String, Encoding)

    Saves worksheet using separator with specified file name and encoding. Used only for CSV files.

    Declaration
    public void SaveAs(string fileName, string separator, Encoding encoding)
    Parameters
    Type Name Description
    System.String fileName

    File to save.

    System.String separator

    Current separator.

    System.Text.Encoding encoding

    Encoding to use.

    SaveAsHtml(Stream)

    Saves worksheet as stream.

    Declaration
    public void SaveAsHtml(Stream stream)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream to save.

    SaveAsHtml(Stream, HtmlSaveOptions)

    Saves worksheet as stream with the specified HtmlSaveOptions.

    Declaration
    public void SaveAsHtml(Stream stream, HtmlSaveOptions saveOptions)
    Parameters
    Type Name Description
    System.IO.Stream stream

    Stream to save.

    HtmlSaveOptions saveOptions

    Save Options

    SaveAsHtml(String)

    Saves worksheet with specified filename.

    Declaration
    public void SaveAsHtml(string filename)
    Parameters
    Type Name Description
    System.String filename

    SaveAsHtml(String, HtmlSaveOptions)

    Saves worksheet with specified filename and HtmlSaveOptions..

    Declaration
    public void SaveAsHtml(string filename, HtmlSaveOptions saveOptions)
    Parameters
    Type Name Description
    System.String filename

    File to save.

    HtmlSaveOptions saveOptions

    Save Options

    Select()

    Selects current tab sheet.

    Declaration
    public void Select()

    Select(ITabSheet)

    Selects single tab sheet.

    Declaration
    public void Select(ITabSheet sheet)
    Parameters
    Type Name Description
    ITabSheet sheet

    Sheet to select.

    SetBlank(Int32, Int32)

    Blanks the specified cell.

    Declaration
    public void SetBlank(int iRow, int iColumn)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    SetBoolean(Int32, Int32, Boolean)

    Sets boolean value for the specified cell.

    Declaration
    public void SetBoolean(int iRow, int iColumn, bool value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.Boolean value

    Value to set.

    SetColumnWidth(Int32, Double)

    Sets column width for the specified column.

    Declaration
    public void SetColumnWidth(int iColumnIndex, double value)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index.

    System.Double value

    Width to set.

    SetColumnWidthInPixels(Int32, Int32)

    Sets column width in pixels for the specified column.

    Declaration
    public void SetColumnWidthInPixels(int iColumnIndex, int value)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index.

    System.Int32 value

    Width in pixels to set.

    SetColumnWidthInPixels(Int32, Int32, Int32)

    Sets column width in pixels to the given number of columns from the specified column index.

    Declaration
    public void SetColumnWidthInPixels(int iStartColumnIndex, int iCount, int value)
    Parameters
    Type Name Description
    System.Int32 iStartColumnIndex

    Start Column index

    System.Int32 iCount

    No of Column to be set width

    System.Int32 value

    Value in pixel to set

    SetDefaultColumnStyle(Int32, IStyle)

    Sets the default column style for the specified column.

    Declaration
    public void SetDefaultColumnStyle(int iColumnIndex, IStyle defaultStyle)
    Parameters
    Type Name Description
    System.Int32 iColumnIndex

    One-based column index.

    IStyle defaultStyle

    Default style.

    SetDefaultColumnStyle(Int32, Int32, IStyle)

    Sets the default column style for the specified starting and ending column.

    Declaration
    public void SetDefaultColumnStyle(int iStartColumnIndex, int iEndColumnIndex, IStyle defaultStyle)
    Parameters
    Type Name Description
    System.Int32 iStartColumnIndex

    Starting column index.

    System.Int32 iEndColumnIndex

    Ending column index.

    IStyle defaultStyle

    Default style.

    SetDefaultRowStyle(Int32, IStyle)

    Sets the default row style for the specified row.

    Declaration
    public void SetDefaultRowStyle(int iRowIndex, IStyle defaultStyle)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    One-based row index.

    IStyle defaultStyle

    Default style.

    SetDefaultRowStyle(Int32, Int32, IStyle)

    Sets the default row style for the specified starting and ending row.

    Declaration
    public void SetDefaultRowStyle(int iStartRowIndex, int iEndRowIndex, IStyle defaultStyle)
    Parameters
    Type Name Description
    System.Int32 iStartRowIndex

    Starting row index.

    System.Int32 iEndRowIndex

    Ending row index.

    IStyle defaultStyle

    Default style.

    SetError(Int32, Int32, String)

    Sets error for the specified cell.

    Declaration
    public void SetError(int iRow, int iColumn, string value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.String value

    Error to set.

    SetFormula(Int32, Int32, String)

    Sets formula for the specified cell.

    Declaration
    public void SetFormula(int iRow, int iColumn, string value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.String value

    Formula to set.

    SetFormulaBoolValue(Int32, Int32, Boolean)

    Sets formula bool value for the specified cell.

    Declaration
    public void SetFormulaBoolValue(int iRow, int iColumn, bool value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.Boolean value

    Represents formula bool value.

    SetFormulaErrorValue(Int32, Int32, String)

    Sets formula error value for the specified cell.

    Declaration
    public void SetFormulaErrorValue(int iRow, int iColumn, string value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.String value

    Represents formula error value.

    SetFormulaNumberValue(Int32, Int32, Double)

    Sets formula number value for the specified cell.

    Declaration
    public void SetFormulaNumberValue(int iRow, int iColumn, double value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.Double value

    Represents formula number value.

    SetFormulaStringValue(Int32, Int32, String)

    Sets formula string value for the specified cell.

    Declaration
    public void SetFormulaStringValue(int iRow, int iColumn, string value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.String value

    Represents formula string value.

    SetNumber(Int32, Int32, Double)

    Sets number for the specified cell.

    Declaration
    public void SetNumber(int iRow, int iColumn, double value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.Double value

    Value to set.

    SetRowHeight(Int32, Double)

    Sets row height for the specified row.

    Declaration
    public void SetRowHeight(int iRow, double value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Double value

    Height to set.

    SetRowHeightInPixels(Int32, Double)

    Sets row height in pixels for the specified row.

    Declaration
    public void SetRowHeightInPixels(int iRowIndex, double value)
    Parameters
    Type Name Description
    System.Int32 iRowIndex

    One-based row index.

    System.Double value

    Value in pixels to set.

    SetRowHeightInPixels(Int32, Int32, Double)

    Sets row height in pixels to the given number of rows from the specified row index.

    Declaration
    public void SetRowHeightInPixels(int iStartRowIndex, int iCount, double value)
    Parameters
    Type Name Description
    System.Int32 iStartRowIndex

    Starting row index.

    System.Int32 iCount

    No of Row to be set width.

    System.Double value

    Value in pixels to set.

    SetText(Int32, Int32, String)

    Sets text for the specified cell.

    Declaration
    public void SetText(int iRow, int iColumn, string value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.String value

    Text to set.

    SetValue(Int32, Int32, String)

    Sets value for the specified cell.

    Declaration
    public void SetValue(int iRow, int iColumn, string value)
    Parameters
    Type Name Description
    System.Int32 iRow

    One-based row index.

    System.Int32 iColumn

    One-based column index.

    System.String value

    Value to set.

    SetValueRowCol(Object, Int32, Int32)

    Sets the value of a cell.

    Declaration
    public void SetValueRowCol(object value, int row, int col)
    Parameters
    Type Name Description
    System.Object value

    The value to be set.

    System.Int32 row

    The row of the cell.

    System.Int32 col

    The column of the cell.

    ShowColumn(Int32, Boolean)

    Shows the specified column.

    Declaration
    public void ShowColumn(int columnIndex, bool isVisible)
    Parameters
    Type Name Description
    System.Int32 columnIndex

    Index at which the column should be hidden.

    System.Boolean isVisible

    True - Column is visible; False - hidden.

    ShowRange(RangesCollection, Boolean)

    Shows/ Hides the collection of range.

    Declaration
    public void ShowRange(RangesCollection ranges, bool isVisible)
    Parameters
    Type Name Description
    RangesCollection ranges

    Ranges specifies the range collection.

    System.Boolean isVisible

    True - Row is visible; false - hidden.

    ShowRange(IRange, Boolean)

    Shows or Hides the specified range.

    Declaration
    public void ShowRange(IRange range, bool isVisible)
    Parameters
    Type Name Description
    IRange range

    Range specifies the particular range to show / hide.

    System.Boolean isVisible

    True - Row is visible; False - hidden.

    ShowRange(IRange[], Boolean)

    Shows or Hides an array of range.

    Declaration
    public void ShowRange(IRange[] ranges, bool isVisible)
    Parameters
    Type Name Description
    IRange[] ranges

    Ranges specifies the range array.

    System.Boolean isVisible

    True - Row is visible; False - hidden.

    ShowRow(Int32, Boolean)

    Shows or Hides the specified row.

    Declaration
    public void ShowRow(int rowIndex, bool isVisible)
    Parameters
    Type Name Description
    System.Int32 rowIndex

    Index at which the row should be hidden.

    System.Boolean isVisible

    True - Row is visible; False - hidden.

    Unprotect(String)

    Unprotects worksheet's content with password.

    Declaration
    public void Unprotect(string password)
    Parameters
    Type Name Description
    System.String password

    Password to unprotect.

    Unselect()

    Unselects current tab sheet.

    Declaration
    public void Unselect()

    WireParentObject()

    Not implemented.

    Declaration
    public void WireParentObject()

    Events

    CellValueChanged

    Occurs when the value of a cell changes.

    Declaration
    public event RangeImpl.CellValueChangedEventHandler CellValueChanged
    Event Type
    Type Description
    RangeImpl.CellValueChangedEventHandler

    ExportDataTableEvent

    Event to choose an action while exporting data from Excel to data table.

    Declaration
    public event WorksheetImpl.ExportDataTableEventHandler ExportDataTableEvent
    Event Type
    Type Description
    WorksheetImpl.ExportDataTableEventHandler

    MissingFunction

    Event raised when an unknown function is encountered.

    Declaration
    public event MissingFunctionEventHandler MissingFunction
    Event Type
    Type Description
    MissingFunctionEventHandler

    ValueChanged

    An event raised on the IWorksheet whenever a value changes.

    Declaration
    public event ValueChangedEventHandler ValueChanged
    Event Type
    Type Description
    ValueChangedEventHandler

    Explicit Interface Implementations

    IWorksheet.Clear()

    Clears worksheet data. Removes all formatting and merges.

    Declaration
    void IWorksheet.Clear()

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IWorksheetGroup
    IWorksheet
    ITabSheet
    IParentApplication
    ICalcData
    ICloneParent
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved