Table of Contents

Class XlsWorksheet

Namespace
Spire.Xls.Core.Spreadsheet
Assembly
Spire.XLS.dll
public class XlsWorksheet : XlsWorksheetBase, IDisposable, INamedObject, ICloneParent, IInternalWorksheet, IWorksheet, ITabSheet, IExcelApplication
Inheritance
XlsWorksheet
Implements
Derived
Inherited Members

Properties

ActivePane

Gets or sets index of the active pane.

public int ActivePane { get; set; }

Property Value

int

AllocatedRange

Returns a Range object that represents a cell or a range of cells.

public IXLSRange AllocatedRange { get; }

Property Value

IXLSRange

AllocatedRangeIncludesFormatting

public bool AllocatedRangeIncludesFormatting { get; set; }

Property Value

bool

AutoFilters

Returns collection of worksheet's autofilters. Read-only.

public IAutoFilters AutoFilters { get; }

Property Value

IAutoFilters

CellList

public List<CellRange> CellList { get; }

Property Value

List<CellRange>

Cells

Returns all used cells in the worksheet. Read-only.

[Obsolete("Please use CellList")]
public IXLSRange[] Cells { get; }

Property Value

IXLSRange[]

Columns

For a Worksheet object, returns an array of Range objects that represents all the columns on the specified worksheet. Read-only Range object.

public IXLSRange[] Columns { get; }

Property Value

IXLSRange[]

ConditionalFormats

Returns collection with all conditional formats in the worksheet. Read-only.

public IConditionalFormatsCollection ConditionalFormats { get; }

Property Value

IConditionalFormatsCollection

Copying

public bool Copying { get; set; }

Property Value

bool

DVTable

public IDataValidationTable DVTable { get; }

Property Value

IDataValidationTable

DefaultColumnWidth

Returns or sets the default width of all the columns in the worksheet. Read/write Double. The following code illustrates how to get the default column width:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Get column width
Console.Write(worksheet.DefaultColumnWidth);

//Set default width
worksheet.DefaultColumnWidth = 40;

//Save to file
workbook.SaveToFile("DefaultColumnWidth.xlsx");
public double DefaultColumnWidth { get; set; }

Property Value

double

DefaultPrintRowHeight

Return default row height.

public int DefaultPrintRowHeight { get; set; }

Property Value

int

DefaultRowHeight

Gets or sets default height of all the rows in the worksheet, in points.Read/write Double. The following code illustrates how to get the default row height:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Get row height
Console.Write(worksheet.DefaultRowHeight);

//Set default height
worksheet.DefaultRowHeight = 40;

//Save to file
workbook.SaveToFile("DefaultRowHeight.xlsx");
public double DefaultRowHeight { get; set; }

Property Value

double

DisplayPageBreaks

True if page breaks (both automatic and manual) on the specified worksheet are displayed.

public bool DisplayPageBreaks { get; set; }

Property Value

bool

FirstVisibleColumn

Index to first visible column in right pane(s).

public int FirstVisibleColumn { get; set; }

Property Value

int

FirstVisibleRow

Index to first visible row in bottom pane(s).

public int FirstVisibleRow { get; set; }

Property Value

int

FormulasVisible

public bool FormulasVisible { get; set; }

Property Value

bool

GridLinesVisible

True if gridlines are visible; False otherwise. The following code illustrates how to set visibility for grid lines:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set grid line visibility
worksheet.GridLinesVisible = false;

//Save to file
workbook.SaveToFile("GridLinesVisible.xlsx");
public bool GridLinesVisible { get; set; }

Property Value

bool

HPageBreaks

Returns an HPageBreaks collection that represents the horizontal page breaks on the sheet. Read-only.

public IHPageBreaks HPageBreaks { get; }

Property Value

IHPageBreaks

HasMergedCells

Indicates whether worksheet has merged cells.

public bool HasMergedCells { get; }

Property Value

bool

HasOleObjects

Indicats whether there is OLE object. The following code illustrates how to access the IListObjects collection in the worksheet to add a new IOleObject and check Ole Object:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create image stream
System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");

//Add ole object
IOleObject oleObject = worksheet.OleObjects.Add("Shapes.xlsx", image, OleLinkType.Embed);

//Check HasOleObject.Output will be true.
Console.Write(worksheet.HasOleObjects);

//Save to file
workbook.SaveToFile("HasOleObjects.xlsx");
public bool HasOleObjects { get; }

Property Value

bool

true if this instance is OLE object; otherwise, false.

HorizontalSplit

public int HorizontalSplit { get; set; }

Property Value

int

Collection of all worksheet's hyperlinks.

public IHyperLinks HyperLinks { get; }

Property Value

IHyperLinks
protected XlsHyperLinksCollection InnerHyperLinks { get; }

Property Value

XlsHyperLinksCollection

IsDisplayZeros

Indicates whether zero values to be displayed

public bool IsDisplayZeros { get; set; }

Property Value

bool

IsEmpty

Indicates whether worksheet is empty. Read-only.

public bool IsEmpty { get; }

Property Value

bool

IsFreezePanes

Indicates whether freezed panes are applied.

public bool IsFreezePanes { get; }

Property Value

bool

IsStringsPreserved

Indicates if all values in the workbook are preserved as strings.

public bool IsStringsPreserved { get; set; }

Property Value

bool

this[int, int]

Gets / sets cell by row and index.

public IXLSRange this[int row, int column] { get; }

Parameters

row int
column int

Property Value

IXLSRange

this[int, int, int, int]

Get cells range.

public IXLSRange this[int row, int column, int lastRow, int lastColumn] { get; }

Parameters

row int
column int
lastRow int
lastColumn int

Property Value

IXLSRange

this[string]

Get cell range.

public IXLSRange this[string name] { get; }

Parameters

name string

Property Value

IXLSRange

ListObjects

Returns all list objects in the worksheet.

public IListObjects ListObjects { get; }

Property Value

IListObjects

MaxDisplayRange

public IXLSRange MaxDisplayRange { get; }

Property Value

IXLSRange

MergedCells

Returns all merged ranges. Read-only. The following code illustrates how to get the merged ranges:

//Create worksheetWorkbook workbook = new Workbook();Worksheet worksheet = workbook.Worksheets[0];//Merge cellsworksheet["C2:D2"].Merge();worksheet["F3:G3"].Merge();//Get merged rangesIXLSRange[] mergedRanges = worksheet.MergedCells;//Get merged range count . Output will be 2Console.Write(mergedRanges.Length);//Save to fileworkbook.SaveToFile("MergedCells.xlsx");
public IXLSRange[] MergedCells { get; }

Property Value

IXLSRange[]

Names

Name range used by macros to access to workbook items.

public INameRanges Names { get; }

Property Value

INameRanges

OleObjects

Gets the OLE objects. The following code illustrates how to access the IListObjects collection in the worksheet to add a new IOleObject:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create image stream
System.Drawing.Image image = System.Drawing.Image.FromFile("image.png");

//Add ole object
IOleObject oleObject = worksheet.OleObjects.Add("Shapes.xlsx", image, OleLinkType.Embed);

//Save to file
workbook.SaveToFile("OLEObjects.xlsx");
public IOleObjects OleObjects { get; }

Property Value

IOleObjects

The OLE objects.

PageSetup

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

public IPageSetup PageSetup { get; }

Property Value

IPageSetup

PivotTables

Returns charts collection. Read-only.

public PivotTablesCollection PivotTables { get; }

Property Value

PivotTablesCollection

ProtectContents

Indicates whether current sheet is protected.

public override bool ProtectContents { get; }

Property Value

bool

QuotedName

Returns quoted name of the worksheet.

public string QuotedName { get; }

Property Value

string

Range

Returns a Range object that represents the used range on the specified worksheet. Read-only.
The following code illustrates how to get used range on the specified worksheet:

//Create worksheetWorkbook workbook = new Workbook();Worksheet worksheet = workbook.Worksheets[0];//Set textworksheet["B2"].Text = "Text";//Set Colorworksheet["J3"].Style.Color = Color.Red;//Get used range . Output will be B2:J3Console.Write(worksheet.Range.RangeAddressLocal);//Save to fileworkbook.SaveToFile("UsedRange.xlsx");
public XlsRange Range { get; }

Property Value

XlsRange

RowColumnHeadersVisible

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

public bool RowColumnHeadersVisible { get; set; }

Property Value

bool

Rows

For a Worksheet object, returns an array of Range objects that represents all the rows on the specified worksheet. Read-only Range object.

public IXLSRange[] Rows { get; }

Property Value

IXLSRange[]

SelectionCount

public int SelectionCount { get; }

Property Value

int

SparklineGroups

public SparklineGroupCollection SparklineGroups { get; }

Property Value

SparklineGroupCollection

StandardHeightFlag

Gets or sets the standard (default) height option flag, which defines that standard (default) row height and book default font height do not match. Bool.

public bool StandardHeightFlag { get; set; }

Property Value

bool

TopLeftCell

Gets top left cell of the worksheet.

public CellRange TopLeftCell { get; set; }

Property Value

CellRange

Type

Returns or sets the worksheet type. Read-only ExcelSheetType.

public ExcelSheetType Type { get; }

Property Value

ExcelSheetType

UseRangesCache

Indicates whether all created range objects should be cached. Default value is true.

public bool UseRangesCache { get; set; }

Property Value

bool

VPageBreaks

Returns a VPageBreaks collection that represents the vertical page breaks on the sheet. Read-only.

public IVPageBreaks VPageBreaks { get; }

Property Value

IVPageBreaks

Version

Gets or sets excel file version.

public ExcelVersion Version { get; set; }

Property Value

ExcelVersion

VerticalSplit

public int VerticalSplit { get; set; }

Property Value

int

ViewMode

Gets or sets the view mode of the sheet.

public ViewMode ViewMode { get; set; }

Property Value

ViewMode

Zoom

Zoom factor of document. The following code illustrates how to set zoom level of the sheet:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set zoom
worksheet.Zoom = 200;

//Save to file
workbook.SaveToFile("Zoom.xlsx");
public int Zoom { get; set; }

Property Value

int

Remarks

Value of zoom should be between 10 and 400.

ZoomScaleNormal

Gets or sets the zoom scale of normal view of the sheet.

public int ZoomScaleNormal { get; set; }

Property Value

int

ZoomScalePageBreakView

Gets or sets the zoom scale of page break preview of the sheet.

public int ZoomScalePageBreakView { get; set; }

Property Value

int

ZoomScalePageLayoutView

Gets or sets the zoom scale of page layout view of the sheet.

public int ZoomScalePageLayoutView { get; set; }

Property Value

int

Methods

AccessColumn(int)

protected void AccessColumn(int iColumnIndex)

Parameters

iColumnIndex int

AccessRow(int)

protected void AccessRow(int iRowIndex)

Parameters

iRowIndex int

AddAllowEditRange(string, CellRange)

AddAllowEditRange : add a range of cells that allow editing

public bool AddAllowEditRange(string title, CellRange range)

Parameters

title string

title

range CellRange

range

Returns

bool

AddAllowEditRange(string, CellRange, string)

AddAllowEditRange : add a range of cells that allow editing

public bool AddAllowEditRange(string title, CellRange range, string password)

Parameters

title string

title

range CellRange

range

password string

password

Returns

bool

ApplyStyle(CellStyle)

public void ApplyStyle(CellStyle style)

Parameters

style CellStyle

ApplyStyle(CellStyle, bool, bool)

Apply style to whole sheet.

public void ApplyStyle(CellStyle style, bool applyRowStyle, bool applyColumnStyle)

Parameters

style CellStyle

style to apply

applyRowStyle bool

true means apply style to all rows

applyColumnStyle bool

true means apply style to all columns

AutoFitColumn(int)

Autofit the column width. The following code illustrates how to Auto-fit the column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set text
worksheet["A1"].Text = "Sample text in cell";

//Set auto fit
worksheet.AutoFitColumn(1);

//Save to file
workbook.SaveToFile("AutoFitColumn.xlsx");
public void AutoFitColumn(int columnIndex)

Parameters

columnIndex int

Column index.

AutoFitColumn(int, AutoFitterOptions)

Autofit the column width.

public void AutoFitColumn(int columnIndex, AutoFitterOptions options)

Parameters

columnIndex int

Column index.

options AutoFitterOptions

auto fit options

AutoFitColumn(int, int, int)

Autofit the column width.

public void AutoFitColumn(int columnIndex, int firstRow, int lastRow)

Parameters

columnIndex int

Column index.

firstRow int

One-based index of the first row to be used for autofit operation.

lastRow int

One-based index of the last row to be used for autofit operation.

AutoFitColumn(int, int, int, AutoFitterOptions)

Autofit the column width.

public void AutoFitColumn(int columnIndex, int firstRow, int lastRow, AutoFitterOptions options)

Parameters

columnIndex int

Column index.

firstRow int

One-based index of the first row to be used for autofit operation.

lastRow int

One-based index of the last row to be used for autofit operation.

options AutoFitterOptions

auto fit options

AutoFitRow(int)

Autofit the row height. The following code illustrates how to Auto-fit the row:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set text
worksheet["C2"].Value = "Sample text";

//Set Style
CellStyle style = workbook.Styles.Add("CustomStyle");
IFont font = style.Font;
font.Size = 18;
worksheet["C2"].Style = style;

//Set auto fit
worksheet.AutoFitRow(2);

//Save to file
workbook.SaveToFile("AutoFitRow.xlsx");
public void AutoFitRow(int rowIndex)

Parameters

rowIndex int

Row index

AutoFitRow(int, int, int, AutoFitterOptions)

Autofit the row height.

public void AutoFitRow(int rowIndex, int firstColumn, int lastColumn, AutoFitterOptions options)

Parameters

rowIndex int

Row index

firstColumn int

One-based index of the first column to be used for autofit operation.

lastColumn int

One-based index of the last column to be used for autofit operation.

options AutoFitterOptions

auto fit options

AutoFitRow(int, int, int, bool)

Autofit the row height.

public void AutoFitRow(int rowIndex, int firstColumn, int lastColumn, bool bRaiseEvents)

Parameters

rowIndex int

Row index

firstColumn int

One-based index of the first column to be used for autofit operation.

lastColumn int

One-based index of the last column to be used for autofit operation.

bRaiseEvents bool

If true then raise events.

AutoFitRow(int, int, int, bool, AutoFitterOptions)

Autofit the row height.

public void AutoFitRow(int rowIndex, int firstColumn, int lastColumn, bool bRaiseEvents, AutoFitterOptions options)

Parameters

rowIndex int

Row index

firstColumn int

One-based index of the first column to be used for autofit operation.

lastColumn int

One-based index of the last column to be used for autofit operation.

bRaiseEvents bool

If true then raise events.

options AutoFitterOptions

auto fit options

CalculateAllValue()

Caculate all formula for the specified worksheet

public void CalculateAllValue()

CheckExistence(int, int)

Indicates whether cell has been initialized. The following code illustrates if the cells was initialized or accessed by the user:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set text
worksheet.Range["A1"].Text = "Hello";

//Check the cell.Output will be true.
Console.Write(worksheet.CheckExistence(1, 1));

//Save to file
workbook.SaveToFile("CheckExistence.xlsx");
public bool CheckExistence(int row, int column)

Parameters

row int

Row index.

column int

Column index.

Returns

bool

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

Clear()

Clears data the worksheet.

public void Clear()

ClearData()

Clears contents of a range.

public void ClearData()

ColumnWidthToPixels(double)

public int ColumnWidthToPixels(double widthInChars)

Parameters

widthInChars double

Returns

int

CopyFrom(XlsWorksheet, Dictionary<string, string>, Dictionary<string, string>, Dictionary<int, int>, WorksheetCopyType, Dictionary<int, int>, Dictionary<int, int>, Dictionary<int, int>)

[Obsolete("the method is not implemented")]
public void CopyFrom(XlsWorksheet worksheet, Dictionary<string, string> hashStyleNames, Dictionary<string, string> hashWorksheetNames, Dictionary<int, int> dicFontIndexes, WorksheetCopyType flags, Dictionary<int, int> hashExtFormatIndexes, Dictionary<int, int> hashNameIndexes, Dictionary<int, int> hashExternSheets)

Parameters

worksheet XlsWorksheet
hashStyleNames Dictionary<string, string>
hashWorksheetNames Dictionary<string, string>
dicFontIndexes Dictionary<int, int>
flags WorksheetCopyType
hashExtFormatIndexes Dictionary<int, int>
hashNameIndexes Dictionary<int, int>
hashExternSheets Dictionary<int, int>

CopyToClipboard()

[Obsolete("the method is not implemented")]
public void CopyToClipboard()

CreateNamedRanges(string, string, bool)

public void CreateNamedRanges(string namedRange, string referRange, bool vertical)

Parameters

namedRange string
referRange string
vertical bool

CreateRanges(CellRange[])

public XlsRangesCollection CreateRanges(CellRange[] ranges)

Parameters

ranges CellRange[]

Returns

XlsRangesCollection

DeleteColumn(int)

Deletes a column.

public void DeleteColumn(int index)

Parameters

index int

DeleteColumn(int, int)

Removes specified column.

public void DeleteColumn(int index, int count)

Parameters

index int

One-based column index to remove.

count int

Number of columns to remove.

DeleteRange(CellRange, DeleteOption)

delete a range in worksheet

public void DeleteRange(CellRange range, DeleteOption deleteOption)

Parameters

range CellRange

the range to be deleted

deleteOption DeleteOption

Choose to move the right range to left or move the below range to above

DeleteRow(int)

Delete a row.

public void DeleteRow(int index)

Parameters

index int

Row index to remove

DeleteRow(int, int)

Removes specified row.

public void DeleteRow(int index, int count)

Parameters

index int

One-based row index to remove

count int

Number of rows to delete.

DeleteRows(int[])

Removes specified rows.

public void DeleteRows(int[] rows)

Parameters

rows int[]

Index of all row that need to remove

ExportDataTable()

public DataTable ExportDataTable()

Returns

DataTable

FreeRange(CellRange)

protected void FreeRange(CellRange range)

Parameters

range CellRange

GetBoolean(int, int)

Gets bool value from cell.

public bool GetBoolean(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

bool

Returns found bool value. If cannot found returns false.

GetCaculateValue(int, int)

[Obsolete("the method is obsolete, please use GetCalculateValue.")]
public object GetCaculateValue(int row, int col)

Parameters

row int
col int

Returns

object

GetCalculateValue(int, int)

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

public object GetCalculateValue(int row, int col)

Parameters

row int

The row of the cell.

col int

The column of the cell.

Returns

object

The formula string or value.

GetCellType(int, int, bool)

Gets cell type from current column.

public XlsWorksheet.TRangeValueType GetCellType(int row, int column, bool bNeedFormulaSubType)

Parameters

row int

Indicates row.

column int

Indicates column.

bNeedFormulaSubType bool

Indicates is need to indified formula sub type.

Returns

XlsWorksheet.TRangeValueType

Returns cell type.

GetClonedObject(Dictionary<string, string>, XlsWorkbook)

public IInternalWorksheet GetClonedObject(Dictionary<string, string> hashNewNames, XlsWorkbook book)

Parameters

hashNewNames Dictionary<string, string>
book XlsWorkbook

Returns

IInternalWorksheet

GetColumnIsAutoFit(int)

Get ColumnIsAutofit By columnIndex

public bool GetColumnIsAutoFit(int columnIndex)

Parameters

columnIndex int

Returns

bool

If the column is null Return false,else if the column width is Autofit Return true, the column width is CustomWidth Return false

GetColumnIsHide(int)

Indicates whether the column is hidden.

public bool GetColumnIsHide(int columnIndex)

Parameters

columnIndex int

Column index.

Returns

bool

GetColumnWidth(int)

Gets the width of the specified column

public double GetColumnWidth(int columnIndex)

Parameters

columnIndex int

Column index

Returns

double

Width of column

GetColumnWidthPixels(int)

Gets the width of the specified column, in units of pixel. The following code illustrates how to get the column width for a particular column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set text
worksheet["A1"].Text = "Sample text in cell";

//Set auto fit
worksheet.AutoFitColumn(1);

//Get column width
Console.WriteLine(worksheet.GetColumnWidthPixels(1));

//Save to file
workbook.SaveToFile("UsedRange.xlsx");
public int GetColumnWidthPixels(int columnIndex)

Parameters

columnIndex int

Column index.

Returns

int

Width of column

GetDefaultColumnStyle(int)

public IStyle GetDefaultColumnStyle(int columnIndex)

Parameters

columnIndex int

Returns

IStyle

GetDefaultRowStyle(int)

public IStyle GetDefaultRowStyle(int rowIndex)

Parameters

rowIndex int

Returns

IStyle

GetError(int, int)

Gets error value from cell.

public string GetError(int row, int column)

Parameters

row int

Row index.

column int

Column index.

Returns

string

Returns error value or null.

GetFormula(int, int, bool)

public string GetFormula(int row, int column, bool bR1C1)

Parameters

row int
column int
bR1C1 bool

Returns

string

GetFormula(int, int, bool, bool)

public string GetFormula(int row, int column, bool bR1C1, bool isForSerialization)

Parameters

row int
column int
bR1C1 bool
isForSerialization bool

Returns

string

GetFormulaBoolValue(int, int)

Gets formula bool value from cell.

public bool GetFormulaBoolValue(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

bool

Returns found bool value. If cannot found returns false.

GetFormulaErrorValue(int, int)

Gets formula error value from cell.

public string GetFormulaErrorValue(int row, int column)

Parameters

row int

Row index.

column int

Column index.

Returns

string

Returns error value or null.

GetFormulaNumberValue(int, int)

Returns formula number value corresponding to the cell.

public double GetFormulaNumberValue(int row, int column)

Parameters

row int

One-based row index of the cell to get value from.

column int

One-based column index of the cell to get value from.

Returns

double

Number contained by the cell.

GetFormulaStringValue(int, int)

Returns formula string value corresponding to the cell.

public string GetFormulaStringValue(int row, int column)

Parameters

row int

One-based row index of the cell to get value from.

column int

One-based column index of the cell to get value from.

Returns

string

String contained by the cell.

GetNumber(int, int)

Returns number value corresponding to the cell.

public double GetNumber(int row, int column)

Parameters

row int

One-based row index of the cell to get value from.

column int

One-based column index of the cell to get value from.

Returns

double

Number contained by the cell.

GetRowHeight(int)

Gets the height of a specified row.

public double GetRowHeight(int row)

Parameters

row int

Row index.

Returns

double

Height of row

GetRowHeightPixels(int)

Gets the height of a specified row in unit of pixel. The following code illustrates how to get the row height for a particular row:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set text
worksheet["C2"].Text = "Sample text";
worksheet["C2"].Style.Font.Size = 18;

//Set auto fit
worksheet.AutoFitRow(2);

//Get row height
Console.WriteLine(worksheet.GetRowHeightPixels(2));

//Save to file
workbook.SaveToFile("UsedRange.xlsx");
public int GetRowHeightPixels(int rowIndex)

Parameters

rowIndex int

Row index.

Returns

int

Height of row

GetRowIsAutoFit(int)

Get GetRowIsAutoFit By rowIndex

public bool GetRowIsAutoFit(int rowIndex)

Parameters

rowIndex int

Returns

bool

If the row is null Return false,else if the row height is Autofit Return true, the row height is CustomHeight Return false

GetRowIsHide(int)

Indicates whether the row is hidden.

public bool GetRowIsHide(int rowIndex)

Parameters

rowIndex int

Row index.

Returns

bool

GetStringValue(int, int)

Returns string value corresponding to the cell.

public string GetStringValue(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

string

String contained by the cell.

GetStringValue(long)

Returns string value corresponding to the cell.

[Obsolete("This is an obsolete method.")]
public string GetStringValue(long cellIndex)

Parameters

cellIndex long

Returns

string

String contained by the cell.

GetText(int, int)

Returns string value corresponding to the cell.

public string GetText(int row, int column)

Parameters

row int

One-based row index of the cell to get value from.

column int

One-based column index of the cell to get value from.

Returns

string

String contained by the cell.

GetTextObject(int, int)

Returns TextWithFormat object corresponding to the specified cell.

public object GetTextObject(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

object

Object corresponding to the specified cell.

GetTextObject(long)

Returns TextWithFormat object corresponding to the specified cell.

[Obsolete("This is an obsolete method.")]
public object GetTextObject(long cellIndex)

Parameters

cellIndex long

Cell index.

Returns

object

Object corresponding to the specified cell.

GroupByColumns(int, int, bool)

Groups columns.

public CellRange GroupByColumns(int firstColumn, int lastColumn, bool isCollapsed)

Parameters

firstColumn int

The first column index to be grouped.

lastColumn int

The last column index to be grouped.

isCollapsed bool

Indicates whether group should be collapsed.

Returns

CellRange

GroupByRows(int, int, bool)

Groups rows.

public CellRange GroupByRows(int firstRow, int lastRow, bool isCollapsed)

Parameters

firstRow int

The first row index to be grouped.

lastRow int

The last row index to be grouped.

isCollapsed bool

Indicates whether group should be collapsed.

Returns

CellRange

HasArrayFormula(long)

Indicates whether cell contains array-entered formula.

[Obsolete("This is an obsolete method.")]
public bool HasArrayFormula(long cellIndex)

Parameters

cellIndex long

cell index.

Returns

bool

HasArrayFormulaRecord(int, int)

Indicates is has array formula.

public bool HasArrayFormulaRecord(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

bool

Indicates is contain array formula record.

HideColumn(int)

Hides a column.

public void HideColumn(int columnIndex)

Parameters

columnIndex int

Column index.

HideColumns(int, int)

Hides columns.

public void HideColumns(int columnIndex, int columnCount)

Parameters

columnIndex int

Column index.

columnCount int

Column count.

HideRow(int)

Hides a row.

public void HideRow(int rowIndex)

Parameters

rowIndex int

Row index.

HideRows(int, int)

Hides a row.

public void HideRows(int rowIndex, int rowCount)

Parameters

rowIndex int

Row index.

rowCount int

Row count.

ImportCustomObjects(ICollection, int, int, ImportObjectOptions)

public int ImportCustomObjects(ICollection list, int firstRow, int firstColumn, ImportObjectOptions options)

Parameters

list ICollection
firstRow int
firstColumn int
options ImportObjectOptions

Returns

int

ImportCustomObjects(ICollection, string[], bool, int, int, int, bool, string, bool)

public int ImportCustomObjects(ICollection list, string[] propertyNames, bool isPropertyNameShown, int firstRow, int firstColumn, int rowNumber, bool insertRows, string dateFormatString, bool convertStringToNumber)

Parameters

list ICollection
propertyNames string[]
isPropertyNameShown bool
firstRow int
firstColumn int
rowNumber int
insertRows bool
dateFormatString string
convertStringToNumber bool

Returns

int

InitializeCollections()

protected override void InitializeCollections()

InsertArray(DateTime[], int, int, bool)

Imports an array of datetimes into worksheet. The following code illustrates how to Imports an array of DateTime values into a worksheet with the specified row and colum:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Initialize the DateTime Array
DateTime[] arrayDate = new DateTime[4] { DateTime.Parse("06:45"), DateTime.Parse("08:30"), DateTime.Parse("09:40"), DateTime.Parse("10:30") };

//Insert the DateTime Array to Sheet
worksheet.InsertArray(arrayDate, 1, 1, true);

//Save to file
workbook.SaveToFile(InsertArray.xlsx");
public int InsertArray(DateTime[] dateTimeArray, int firstRow, int firstColumn, bool isVertical)

Parameters

dateTimeArray DateTime[]

Datetime array.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

Returns

int

InsertArray(double[], int, int, bool)

Imports an array of doubles into a worksheet. The following code illustrates how to Imports an array of Double values into a worksheet with the specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Initialize the double Array
double[] arrayDouble = new double[4] { 344.0045, 345.0045, 346.0045, 347.0045 };

//Insert the double Array to Sheet
worksheet.InsertArray(arrayDouble, 1, 1, true);

//Save to file
workbook.SaveToFile(InsertArray.xlsx");
public int InsertArray(double[] doubleArray, int firstRow, int firstColumn, bool isVertical)

Parameters

doubleArray double[]

Double array

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

Returns

int

InsertArray(int[], int, int, bool)

Imports an array of integer into a worksheet. The following code illustrates how to Imports an array of integer values into a worksheet with the specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Initialize the integer Array
int[] arrayInt = new int[4] {1000, 2000, 3000, 4000};

//Insert the integer Array to Sheet
worksheet.InsertArray(arrayInt, 1, 1, true);

//Save to file
workbook.SaveToFile(InsertArray.xlsx");
public int InsertArray(int[] intArray, int firstRow, int firstColumn, bool isVertical)

Parameters

intArray int[]

Integer array.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

Returns

int

InsertArray(object[,], int, int)

Imports an array of objects into a worksheet. The following code illustrates how to Imports a two-dimensional array of Object into a worksheet with the specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Initialize the Object Array
object[,] arrayTwoDimen = new object[3, 2] { { "AND", "OR" }, { "NAND", "XOR" },{ "NOR", "NOT" } };

//Insert the Object Array to Sheet
worksheet.InsertArray(arrayTwoDimen, 1, 1);

//Save to file
workbook.SaveToFile(InsertArray.xlsx");
public int InsertArray(object[,] objectArray, int firstRow, int firstColumn)

Parameters

objectArray object[,]

Object array.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

Returns

int

InsertArray(object[,], int, int, bool)

Imports an array of objects into a worksheet.

public int InsertArray(object[,] objectArray, int firstRow, int firstColumn, bool needConvert)

Parameters

objectArray object[,]

Object array.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

needConvert bool

Whether others type inputted as string type need to be converted, such as number, datetime.

Returns

int

InsertArray(object[], int, int, bool)

Imports an array of objects into a worksheet. The following code illustrates how to Imports an array of Object into a worksheet with specified alignment:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Initialize the Object Array
object[] array = new object[4] { "Total Income", "Actual Expense", "Expected Expenses", "Profit" };

//Insert the Object Array to Sheet
worksheet.InsertArray(array, 1, 1, true);

//Save to file
workbook.SaveToFile(InsertArray.xlsx");
public int InsertArray(object[] arrObject, int firstRow, int firstColumn, bool isVertical)

Parameters

arrObject object[]

Array to import.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

TRUE if array should be imported vertically; FALSE - horizontally.

Returns

int

Number of imported elements.

InsertArray(string[], int, int, bool)

Imports an array of strings into a worksheet. The following code illustrates how to Imports an array of String into a worksheet with specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Initialize the string Array
string[] arrayString = new string[4] { "Total Income", "Actual Expense", "Expected Expenses", "Profit" };

//Insert the string Array to Sheet
worksheet.InsertArray(arrayString, 1, 1, true);

//Save to file
workbook.SaveToFile(InsertArray.xlsx");
public int InsertArray(string[] stringArray, int firstRow, int firstColumn, bool isVertical)

Parameters

stringArray string[]

String array.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

Returns

int

InsertArrayList(ArrayList, int, int, bool)

Imports an arraylist of data into a worksheet.

public int InsertArrayList(ArrayList arrayList, int firstRow, int firstColumn, bool isVertical)

Parameters

arrayList ArrayList

Data arraylist.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

Returns

int

InsertArrayList(ArrayList, int, int, bool, bool)

Imports an arraylist of data into a worksheet.

public int InsertArrayList(ArrayList arrayList, int firstRow, int firstColumn, bool isVertical, bool isText)

Parameters

arrayList ArrayList

Data arraylist.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

isText bool

Specifies to import data as text or not.

Returns

int

InsertArray<T>(T[], int, int, bool, bool)

Imports an array of objects into a worksheet.

public int InsertArray<T>(T[] objects, int firstRow, int firstColumn, bool isVertical, bool isText)

Parameters

objects T[]

Object array.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

isVertical bool

Specifies to import data vertically or horizontally.

isText bool

Returns

int

Type Parameters

T

InsertColumn(int)

Inserts a new column into the worksheet.

public void InsertColumn(int columnIndex)

Parameters

columnIndex int

Column index

InsertColumn(int, int)

Inserts specified number column into the worksheet.

public void InsertColumn(int columnIndex, int columnCount)

Parameters

columnIndex int

Column index

columnCount int

Number of columns to insert.

InsertColumn(int, int, InsertOptionsType)

public void InsertColumn(int columnIndex, int columnCount, InsertOptionsType insertOptions)

Parameters

columnIndex int
columnCount int
insertOptions InsertOptionsType

InsertCutRange(IXLSRange, int, int, InsertMoveOption)

Insert cut range into worksheet at specified position.

public void InsertCutRange(IXLSRange cutRange, int rowIndex, int colIndex, InsertMoveOption moveOptions)

Parameters

cutRange IXLSRange

the cut range

rowIndex int

the dest range first row index

colIndex int

the dest range first column index

moveOptions InsertMoveOption

insert options.

InsertDataColumn(DataColumn, bool, int, int)

Imports data column. The following code illustrates how to Imports data from a DataColumn into a worksheet with the specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Insert the DataColumn to worksheet
System.Data.DataColumn column = table.Columns[2];
worksheet.InsertDataColumn(column, true, 1, 1);

//Save to file
workbook.SaveToFile(InsertDataColumn.xlsx");
public int InsertDataColumn(DataColumn dataColumn, bool columnHeaders, int firstRow, int firstColumn)

Parameters

dataColumn DataColumn

Data column to import.

columnHeaders bool

Indicates whether to import field names.

firstRow int

Index of the first row.

firstColumn int

Index of the first column

Returns

int

InsertDataColumns(DataColumn[], bool, int, int)

Imports array of data columns.

public int InsertDataColumns(DataColumn[] dataColumns, bool columnHeaders, int firstRow, int firstColumn)

Parameters

dataColumns DataColumn[]

Data columns to import.

columnHeaders bool

Indicates whether to import field names.

firstRow int

Index to the first row.

firstColumn int

Index to the first column.

Returns

int

InsertDataTable(DataTable, bool, int, int)

Imports data from a DataTable into worksheet. The following code illustrates how to Imports data from a DataTable into a worksheet with the specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Insert the DataTable to worksheet
worksheet.InsertDataTable(table, true, 1, 1);

//Save to file
workbook.SaveToFile(InsertDataTable.xlsx");
public int InsertDataTable(DataTable dataTable, bool columnHeaders, int firstRow, int firstColumn)

Parameters

dataTable DataTable

DataTable

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

Returns

int

InsertDataTable(DataTable, bool, int, int, bool)

Imports data from a DataTable into worksheet. The following code illustrates how to Imports data from a DataTable into a worksheet with the specified row and column along with the preserve type:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Insert the DataTable to worksheet
worksheet.InsertDataTable(table, true, 1, 1 , true);

//Save to file
workbook.SaveToFile(InsertDataTable.xlsx");
public int InsertDataTable(DataTable dataTable, bool columnHeaders, int firstRow, int firstColumn, bool transTypes)

Parameters

dataTable DataTable

DataTable

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

transTypes bool

Indicates if preserve types when insert data into worksheet

Returns

int

InsertDataTable(DataTable, bool, int, int, int, int)

Imports data from a DataTable into worksheet. The following code illustrates how to Imports data from a DataTable into a worksheet with the specified range:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Insert the DataTable to worksheet
worksheet.InsertDataTable(table, true, 1 , 1 , 2 , 2);

//Save to file
workbook.SaveToFile(InsertDataTable.xlsx");
public int InsertDataTable(DataTable dataTable, bool columnHeaders, int firstRow, int firstColumn, int maxRows, int maxColumns)

Parameters

dataTable DataTable

DataTable

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

maxRows int

Maximum number of rows to import

maxColumns int

Maximum number of columns to import

Returns

int

InsertDataTable(DataTable, bool, int, int, int, int, bool)

Imports data from a DataTable into worksheet. The following code illustrates how to Imports data from a DataTable into a worksheet with specified range along with preserve type:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Insert the DataTable to worksheet
worksheet.InsertDataTable(table, true, 1 , 1 , 2 , 2 , true);

//Save to file
workbook.SaveToFile(InsertDataTable.xlsx");
public int InsertDataTable(DataTable dataTable, bool columnHeaders, int firstRow, int firstColumn, int maxRows, int maxColumns, bool transTypes)

Parameters

dataTable DataTable

Datatable

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

maxRows int

Maximum number of rows to import

maxColumns int

Maximum number of columns to import

transTypes bool

Indicates if preserve types when insert data into worksheet

Returns

int

InsertDataTable(DataTable, bool, int, int, int, int, DataColumn[], bool)

Imports data from a DataTable into worksheet

public int InsertDataTable(DataTable dataTable, bool columnHeaders, int firstRow, int firstColumn, int maxRows, int maxColumns, DataColumn[] columnsArray, bool transTypes)

Parameters

dataTable DataTable

DataTable

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

maxRows int

Maximum number of rows to import

maxColumns int

Maximum number of columns to import

columnsArray DataColumn[]

Array of columns to import.

transTypes bool

Indicates if preserve types when insert data into worksheet.true is default

Returns

int

InsertDataView(DataView, bool, int, int)

Imports data from a DataView into worksheet. The following code illustrates how to Imports data from a DataView into a worksheet with the specified row and column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Initialize dataview of datatable
System.Data.DataView view = table.DefaultView;

//Import data from DataView
worksheet.InsertDataView(view, true, 1, 1);

//Save to file
workbook.SaveToFile(InsertDataView.xlsx");
public int InsertDataView(DataView dataView, bool columnHeaders, int firstRow, int firstColumn)

Parameters

dataView DataView

Data view object

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

Returns

int

InsertDataView(DataView, bool, int, int, bool)

Imports data from a DataView into worksheet. The following code illustrates how to Imports data from a DataView into a worksheet with the specified row and column along with preserve type:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Initialize dataview of datatable
System.Data.DataView view = table.DefaultView;

//Import data from DataView
worksheet.InsertDataView(view, true, 1, 1 , true);

//Save to file
workbook.SaveToFile(InsertDataView.xlsx");
public int InsertDataView(DataView dataView, bool columnHeaders, int firstRow, int firstColumn, bool transTypes)

Parameters

dataView DataView

Dataview object.

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

transTypes bool

Indicates if preserve types when insert data into worksheet.

Returns

int

InsertDataView(DataView, bool, int, int, int, int)

Imports data from a DataView into worksheet. The following code illustrates how to Imports data from a DataView into a worksheet with the specified range:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Initialize dataview of datatable
System.Data.DataView view = table.DefaultView;

//Import data from DataView
worksheet.InsertDataView(view, true, 1, 1 , 2 , 2);

//Save to file
workbook.SaveToFile(InsertDataView.xlsx");
public int InsertDataView(DataView dataView, bool columnHeaders, int firstRow, int firstColumn, int maxRows, int maxColumns)

Parameters

dataView DataView

Dataview object.

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

maxRows int

Maximum number of rows to import.

maxColumns int

Maximum number of columns to import.

Returns

int

InsertDataView(DataView, bool, int, int, int, int, bool)

Imports data from a DataView into worksheet. The following code illustrates how to Imports data from a DataView into a worksheet with the specified range along with preserve type:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Create a DataTable
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("ID", typeof(int));
table.Columns.Add("Item", typeof(string));
table.Columns.Add("Name", typeof(string));
table.Rows.Add(1, "Soap", "David");
table.Rows.Add(2, "Paste", "Sam");
table.Rows.Add(3, "Cream", "Christoff");

//Initialize dataview of datatable
System.Data.DataView view = table.DefaultView;

//Import data from DataView
worksheet.InsertDataView(view, true, 1, 1 , 2 , 2 , true);

//Save to file
workbook.SaveToFile(InsertDataView.xlsx");
public int InsertDataView(DataView dataView, bool columnHeaders, int firstRow, int firstColumn, int maxRows, int maxColumns, bool transTypes)

Parameters

dataView DataView

Dataview object.

columnHeaders bool

Indicates whether to import field names.

firstRow int

The row number of the first cell to import in.

firstColumn int

The column number of the first cell to import in.

maxRows int

Maximum number of rows to import.

maxColumns int

Maximum number of columns to import.

transTypes bool

Indicates if preserve types when insert data into worksheet.

Returns

int

InsertRange(int, int, int, int, InsertMoveOption, InsertOptionsType)

Insert a cell range into worksheet

public IXLSRange InsertRange(int rowIndex, int columnIndex, int rowCount, int columnCount, InsertMoveOption moveOptions, InsertOptionsType insertOptions)

Parameters

rowIndex int

the cell range first row index

columnIndex int

the cell range first column index

rowCount int

the number of rows

columnCount int

the number of columns

moveOptions InsertMoveOption

Insert options.

insertOptions InsertOptionsType

Move the cell on the right to right or Move the cell below down

Returns

IXLSRange

return the range that insert into worksheet

InsertRow(int)

Inserts a new row into the worksheet.

public void InsertRow(int rowIndex)

Parameters

rowIndex int

Index at which new row should be inserted

InsertRow(int, int)

Inserts multiple rows into the worksheet.

public void InsertRow(int rowIndex, int rowCount)

Parameters

rowIndex int

Index at which new row should be inserted

rowCount int

Number of rows to be inserted.

InsertRow(int, int, InsertOptionsType)

public void InsertRow(int rowIndex, int rowCount, InsertOptionsType insertOptions)

Parameters

rowIndex int
rowCount int
insertOptions InsertOptionsType

IntersectRanges(IXLSRange, IXLSRange)

protected IXLSRange IntersectRanges(IXLSRange range1, IXLSRange range2)

Parameters

range1 IXLSRange
range2 IXLSRange

Returns

IXLSRange

IsArrayFormula(int, int)

Indicates whether cell contains array-entered formula.

public bool IsArrayFormula(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

bool

True if cell contains array-entered formula.

IsArrayFormula(long)

[Obsolete("This is an obsolete method.")]
public bool IsArrayFormula(long cellIndex)

Parameters

cellIndex long

Returns

bool

IsColumnVisible(int)

Indicates whether column is visible.

public bool IsColumnVisible(int columnIndex)

Parameters

columnIndex int

Column index.

Returns

bool

true - visible, otherwise false.

IsExternalFormula(int, int)

Indicates is formula in cell is formula to external workbook.

public bool IsExternalFormula(int row, int column)

Parameters

row int

Represents row index.

column int

Represents column index.

Returns

bool

If contain extern formula returns true; otherwise false.

IsRowVisible(int)

Indicates whether row is visible.

public bool IsRowVisible(int rowIndex)

Parameters

rowIndex int

Row index.

Returns

bool

true - visible, otherwise false.

MergeRanges(IXLSRange, IXLSRange)

protected IXLSRange MergeRanges(IXLSRange range1, IXLSRange range2)

Parameters

range1 IXLSRange
range2 IXLSRange

Returns

IXLSRange

MoveWorksheet(int)

Moves worksheet into new position.

public void MoveWorksheet(int destIndex)

Parameters

destIndex int

Destination index.

PixelsToColumnWidth(double)

public double PixelsToColumnWidth(double pixels)

Parameters

pixels double

Returns

double

Remove()

Removes worksheet from parernt worksheets collection.

public void Remove()

RemoveMergedCells(IXLSRange)

public void RemoveMergedCells(IXLSRange range)

Parameters

range IXLSRange

RemovePanes()

Removes panes from a worksheet.

public void RemovePanes()

ReparseFormula()

public void ReparseFormula()

Replace(string, DataColumn, bool)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string value with data column:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by data column
string oldValue = "Find";
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Rows.Add(1);
System.Data.DataColumn dataColumn = table.Columns[0];
worksheet.Replace(oldValue, dataColumn, true);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, DataColumn column, bool columnHeaders)

Parameters

oldValue string

String value to replace.

column DataColumn

Data table with new data.

columnHeaders bool

Indicates whether to import field names.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

Replace(string, DataTable, bool)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string value with data table:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by data table
string oldValue = "Find";
System.Data.DataTable table = new System.Data.DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Rows.Add(1);
worksheet.Replace(oldValue, table, true);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, DataTable newValues, bool columnHeaders)

Parameters

oldValue string

String value to replace.

newValues DataTable

Data table with new data.

columnHeaders bool

Indicates whether to import field names.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

Replace(string, DateTime)

Replaces cells' values with new data. The following code illustrates how to replace the string value with datetime:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by dateTime
string oldValue = "Find";
DateTime dateTime = DateTime.Now;
worksheet.Replace(oldValue, dateTime);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, DateTime newValue)

Parameters

oldValue string

String value to replace.

newValue DateTime

New value for the range with specified string.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

Replace(string, double)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string with double:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by double
string oldValue = "Ten";
worksheet.Replace(oldValue, 10.0);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, double newValue)

Parameters

oldValue string

String value to replace.

newValue double

New value for the range with specified string.

Replace(string, double[], bool)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string with array of double values:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by array of double values
string oldValue = "Find";
double[] newValues = { 1.0, 2.0 };
worksheet.Replace(oldValue, newValues, true);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, double[] newValues, bool isVertical)

Parameters

oldValue string

String value to replace.

newValues double[]

Array of new values.

isVertical bool

Indicates whether array should be inserted vertically.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

Replace(string, int[], bool)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string with array of int values:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by array of int values
string oldValue = "Find";
int[] newValues = { 1, 2 };
worksheet.Replace(oldValue, newValues, true);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, int[] newValues, bool isVertical)

Parameters

oldValue string

String value to replace.

newValues int[]

Array of new values.

isVertical bool

Indicates whether array should be inserted vertically.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

Replace(string, string)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string with another string:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by newValue
string oldValue = "Find";
string newValue = "NewValue";
worksheet.Replace(oldValue, newValue);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, string newValue)

Parameters

oldValue string

String value to replace.

newValue string

New value for the range with specified string.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

Replace(string, string[], bool)

Replaces cells' values with new data. The following code snippet illustrates how to replace the string with array of string values:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Replace the oldValue by array of string values
string oldValue = "Find";
string[] newValues = { "X values", "Y values" };
worksheet.Replace(oldValue, newValues , true);

//Save to file
workbook.SaveToFile("Replace.xlsx");
public void Replace(string oldValue, string[] newValues, bool isVertical)

Parameters

oldValue string

String value to replace.

newValues string[]

Array of new values.

isVertical bool

Indicates whether array should be inserted vertically.

Remarks

This can be long operation (needs iteration through all cells in the worksheet). Better use named ranges instead and call Import function instead of placeholders.

ReplaceAll(string, CellStyle, string, CellStyle)

Replaces cells' values with new data and style.

public int ReplaceAll(string oldValue, CellStyle oldStyle, string newValue, CellStyle newStyle)

Parameters

oldValue string

String value to replace.

oldStyle CellStyle

Cell style to replace.

newValue string

New value for the range with specified string.

newStyle CellStyle

New cell style for the range.

Returns

int

ReplaceAll(string, string, bool)

public int ReplaceAll(string oldValue, string newValue, bool matchCase)

Parameters

oldValue string
newValue string
matchCase bool

Returns

int

SaveAndGetShapesToImage(SaveShapeTypeOption)

Save option specify shapes to image, and get option specify shapes together.

public Dictionary<IShape, SKBitmap> SaveAndGetShapesToImage(SaveShapeTypeOption option)

Parameters

option SaveShapeTypeOption

Returns

Dictionary<IShape, SKBitmap>

SaveShapesToImage(SaveShapeTypeOption)

Save option specify shapes to image.

public List<SKBitmap> SaveShapesToImage(SaveShapeTypeOption option)

Parameters

option SaveShapeTypeOption

Returns

List<SKBitmap>

SaveToFile(string, string)

Save worksheet to file. The following code illustrates how to saves the worksheet in a different file with separator:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Save to file
worksheet.SaveToFile("SaveToFile.csv" , ",");
public void SaveToFile(string fileName, string separator)

Parameters

fileName string

File name.

separator string

Seperator.

SaveToFile(string, string, bool)

Save worksheet to file.

public void SaveToFile(string fileName, string separator, bool retainHiddenData)

Parameters

fileName string

File name.

separator string

Seperator.

retainHiddenData bool

retain hidden data

SaveToFile(string, string, Encoding)

Save worksheet to file..

public void SaveToFile(string fileName, string separator, Encoding encoding)

Parameters

fileName string

File name.

separator string

Seperator.

encoding Encoding

Encoding to use.

SaveToFile(string, string, Encoding, bool)

Save worksheet to file..

public void SaveToFile(string fileName, string separator, Encoding encoding, bool addQuotationsForStringValue)

Parameters

fileName string

File name.

separator string

Seperator.

encoding Encoding

Encoding to use.

addQuotationsForStringValue bool

Add double Quotation marks for string value.

SaveToHtml(Stream)

Save to HTML stream. The following code snippets illustrates how to save as html as stream:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Creat stream
Stream stream = new MemoryStream();

//Save to HTML stream
worksheet.SaveToHtml(stream);
public void SaveToHtml(Stream stream)

Parameters

stream Stream

Stream object

SaveToHtml(Stream, HTMLOptions)

Saves work sheet to HTML. The following code snippets illustrates how to save as html as stream with Save option:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Creat stream
Stream stream = new MemoryStream();

//Save to HTML stream
worksheet.SaveToHtml(stream, Spire.Xls.Core.Spreadsheet.HTMLOptions.Default);
public void SaveToHtml(Stream stream, HTMLOptions saveOption)

Parameters

stream Stream

The stream

saveOption HTMLOptions

The option

SaveToHtml(string)

Save to HTML file. The following code snippets illustrates how to save as html to the specified file name:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Save to HTML file
worksheet.SaveToHtml("Output.html");
public void SaveToHtml(string filename)

Parameters

filename string

File name

SaveToHtml(string, HTMLOptions)

Saves as HTML. The following code snippets illustrates how to save as html to the specified file name and save option:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Save to HTML file
worksheet.SaveToHtml("Sample.html" , Spire.Xls.Core.Spreadsheet.HTMLOptions.Default);
public void SaveToHtml(string fileName, HTMLOptions saveOption)

Parameters

fileName string

The filename

saveOption HTMLOptions

The option

SaveToPdf(string)

Save worksheet to pdf.

public void SaveToPdf(string fileName)

Parameters

fileName string

File name.

SaveToPdf(string, FileFormat)

Save worksheet to pdf.

[Obsolete("the parameter[fileFormat] is useless")]
public void SaveToPdf(string fileName, FileFormat fileFormat)

Parameters

fileName string

File name.

fileFormat FileFormat

SaveToPdfStream(Stream)

Save worksheet to pdf Stream.

public void SaveToPdfStream(Stream stream)

Parameters

stream Stream

Stream.

SaveToPdfStream(Stream, FileFormat)

[Obsolete("the parameter[fileFormat] is useless")]
public void SaveToPdfStream(Stream stream, FileFormat fileFormat)

Parameters

stream Stream
fileFormat FileFormat

SaveToStream(Stream, string)

Save worksheet to stream. The following code illustrates how to saves the worksheet as stream with separator:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Create stream
Stream stream = new MemoryStream();

//Save to stream
worksheet.SaveToStream(stream , ",");
public void SaveToStream(Stream stream, string separator)

Parameters

stream Stream

Stream object.

separator string

Seperator.

SaveToStream(Stream, string, bool)

Save worksheet to stream.

public void SaveToStream(Stream stream, string separator, bool retainHiddenData)

Parameters

stream Stream

Stream object.

separator string

Seperator.

retainHiddenData bool

retain hidden data

SaveToStream(Stream, string, Encoding)

Save worksheet to stream.

public void SaveToStream(Stream stream, string separator, Encoding encoding)

Parameters

stream Stream

Stream to save.

separator string

Current seperator.

encoding Encoding

Encoding to use.

SaveToStream(Stream, string, Encoding, bool)

Save worksheet to stream.

public void SaveToStream(Stream stream, string separator, Encoding encoding, bool addQuotationsForStringValue)

Parameters

stream Stream

Stream to save.

separator string

Current seperator.

encoding Encoding

Encoding to use.

addQuotationsForStringValue bool

Add double Quotation marks for string value.

SaveToXps(string)

Saves specific worksheet to xps.

public void SaveToXps(string fileName)

Parameters

fileName string

File name.

SetActiveCell(IXLSRange)

public void SetActiveCell(IXLSRange range)

Parameters

range IXLSRange

SetActiveCell(IXLSRange, bool)

public void SetActiveCell(IXLSRange range, bool updateApplication)

Parameters

range IXLSRange
updateApplication bool

SetBlank(int, int)

Sets blank in specified cell.

public void SetBlank(int iRow, int iColumn)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

SetBoolean(int, int, bool)

Sets value in the specified cell.

public void SetBoolean(int iRow, int iColumn, bool value)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

value bool

Value to set.

SetCaculateValue(object, int, int)

[Obsolete("the method is obsolete, please use SetCalculateValue.")]
public void SetCaculateValue(object value, int row, int col)

Parameters

value object
row int
col int

SetCalculateValue(object, int, int)

Sets the value of a cell.

public void SetCalculateValue(object value, int row, int col)

Parameters

value object

The value to be set.

row int

The row of the cell.

col int

The column of the cell.

SetCellValue(int, int, bool)

Sets value in the specified cell.

public void SetCellValue(int rowIndex, int columnIndex, bool boolValue)

Parameters

rowIndex int

Row index.

columnIndex int

Column index.

boolValue bool

Value to set.

SetCellValue(int, int, string)

Sets value in the specified cell.

public void SetCellValue(int rowIndex, int columnIndex, string stringValue)

Parameters

rowIndex int

Row index

columnIndex int

Column index.

stringValue string

Value to set.

SetColumnWidth(int, double)

Set solumn width

public void SetColumnWidth(int columnIndex, double width)

Parameters

columnIndex int

Column index.

width double

Width to set.

SetColumnWidthInPixels(int, int)

Sets column width in pixels. The following code illustrates how to set width for a column:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set column width
worksheet.SetColumnWidthInPixels(2, 160);

//Save to file
workbook.SaveToFile("SetColumnWidthInPixels.xlsx");
public void SetColumnWidthInPixels(int iColumn, int value)

Parameters

iColumn int

One-based column index.

value int

Width in pixels to set.

SetColumnWidthInPixels(int, int, int)

Sets the width of the specified columns.

public void SetColumnWidthInPixels(int columnIndex, int count, int value)

Parameters

columnIndex int

Column index

count int

count

value int

Value

SetDefaultColumnStyle(int, IStyle)

Sets default style for column.

public void SetDefaultColumnStyle(int columnIndex, IStyle defaultStyle)

Parameters

columnIndex int

Column index.

defaultStyle IStyle

Default style.

SetDefaultColumnStyle(int, int, IStyle)

public void SetDefaultColumnStyle(int firstColumnIndex, int lastColumnIndex, IStyle defaultStyle)

Parameters

firstColumnIndex int
lastColumnIndex int
defaultStyle IStyle

SetDefaultRowStyle(int, IStyle)

public void SetDefaultRowStyle(int rowIndex, IStyle defaultStyle)

Parameters

rowIndex int
defaultStyle IStyle

SetDefaultRowStyle(int, int, IStyle)

public void SetDefaultRowStyle(int firstRowIndex, int lastRowIndex, IStyle defaultStyle)

Parameters

firstRowIndex int
lastRowIndex int
defaultStyle IStyle

SetError(int, int, string)

Sets error in the specified cell.

public void SetError(int iRow, int iColumn, string value)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

value string

Error to set.

SetError(int, int, string, bool)

public void SetError(int iRow, int iColumn, string value, bool isSetText)

Parameters

iRow int
iColumn int
value string
isSetText bool

SetFirstColumn(int)

public void SetFirstColumn(int columnIndex)

Parameters

columnIndex int

SetFirstRow(int)

Updates first row index.

public void SetFirstRow(int rowIndex)

Parameters

rowIndex int

Row index.

SetFormula(int, int, string)

Sets formula in the specified cell.

public void SetFormula(int iRow, int iColumn, string value)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

value string

Formula to set.

SetFormula(int, int, string, bool)

Sets formula in the specified cell.

public void SetFormula(int iRow, int iColumn, string value, bool bIsR1C1)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

value string

Formula to set.

bIsR1C1 bool

Indicates is formula in R1C1 notation.

SetFormulaBoolValue(int, int, bool)

Sets formula bool value.

public void SetFormulaBoolValue(int iRow, int iColumn, bool value)

Parameters

iRow int

One based row index.

iColumn int

One based column index.

value bool

Represents formula bool value for set.

SetFormulaErrorValue(int, int, string)

Sets formula error value.

public void SetFormulaErrorValue(int iRow, int iColumn, string value)

Parameters

iRow int

One based row index.

iColumn int

One based column index.

value string

Represents formula error value for set.

SetFormulaNumberValue(int, int, double)

Sets formula number value.

public void SetFormulaNumberValue(int iRow, int iColumn, double value)

Parameters

iRow int

One based row index.

iColumn int

One based column index.

value double

Represents formula number value for set.

SetFormulaStringValue(int, int, string)

Sets formula string value.

public void SetFormulaStringValue(int iRow, int iColumn, string value)

Parameters

iRow int

One based row index.

iColumn int

One based column index.

value string

Represents formula string value for set.

SetLastColumn(int)

Updates last column index.

public void SetLastColumn(int columnIndex)

Parameters

columnIndex int

Column index.

SetLastRow(int)

Updates last row index.

public void SetLastRow(int rowIndex)

Parameters

rowIndex int

Row index.

SetNumber(int, int, double)

Sets value in the specified cell.

public void SetNumber(int iRow, int iColumn, double value)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

value double

Value to set.

SetRowHeight(int, double)

Sets the height of the specified row.

public void SetRowHeight(int rowIndex, double height)

Parameters

rowIndex int

Row index.

height double

Height.

SetRowHeightInPixels(int, int, double)

Set Row height from Start Row index

public void SetRowHeightInPixels(int rowIndex, int count, double value)

Parameters

rowIndex int

Row index

count int
value double

Value

SetRowHeightPixels(int, double)

Sets the height of the specified row. The following code illustrates how to set height for a row:

//Create worksheet
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];

//Set row height
worksheet.SetRowHeightPixels(3, 150);

//Save to file
workbook.SaveToFile("SetRowHeightPixels.xlsx");
public void SetRowHeightPixels(int rowIndex, double height)

Parameters

rowIndex int

Row index.

height double

Height.

SetText(int, int, string)

Sets text in the specified cell.

public void SetText(int iRow, int iColumn, string value)

Parameters

iRow int

One-based row index of the cell to set value.

iColumn int

One-based column index of the cell to set value.

value string

Text to set.

SetValue(int, int, string)

public void SetValue(int rowIndex, int columnIndex, string stringValue)

Parameters

rowIndex int
columnIndex int
stringValue string

ShowColumn(int)

Shows a column.

public void ShowColumn(int columnIndex)

Parameters

columnIndex int

Column index.

ShowRow(int)

public void ShowRow(int rowIndex)

Parameters

rowIndex int

Subtotal(IXLSRange, int, int[], SubtotalTypes)

Creates subtotals for the range.

public void Subtotal(IXLSRange range, int groupByIndex, int[] totalFields, SubtotalTypes subtotalType)

Parameters

range IXLSRange

The range

groupByIndex int

The field index to group by, offset from zero

totalFields int[]

An array of zero-based field index offsets, indicating the fields to which the subtotals are added.

subtotalType SubtotalTypes

The subtotal type.

Subtotal(IXLSRange, int, int[], SubtotalTypes, bool, bool, bool)

Creates subtotals for the range.

public void Subtotal(IXLSRange range, int groupByIndex, int[] totalFields, SubtotalTypes subtotalType, bool replace, bool addPageBreak, bool addsummaryBelowData)

Parameters

range IXLSRange

The range

groupByIndex int

The field index to group by, offset from zero

totalFields int[]

An array of zero-based field index offsets, indicating the fields to which the subtotals are added.

subtotalType SubtotalTypes

The subtotal type.

replace bool

Indicates whether replace the current subtotals

addPageBreak bool

Indicates whether add page break between groups

addsummaryBelowData bool

Indicates whether add summarry below data.

ToEMFStreamForOnline(Stream, int, int, int, int)

public void ToEMFStreamForOnline(Stream stream, int firstRow, int firstColumn, int lastRow, int lastColumn)

Parameters

stream Stream
firstRow int
firstColumn int
lastRow int
lastColumn int

ToImage(int, int, int, int)

public Stream ToImage(int firstRow, int firstColumn, int lastRow, int lastColumn)

Parameters

firstRow int
firstColumn int
lastRow int
lastColumn int

Returns

Stream

ToSVGStream(Stream, int, int, int, int)

Convert CellRange to Svg stream

public void ToSVGStream(Stream stream, int firstRow, int firstColumn, int lastRow, int lastColumn)

Parameters

stream Stream

stream.

firstRow int

One-based index of the first row to convert.

firstColumn int

One-based index of the first column to convert.

lastRow int

One-based index of the last row to convert.

lastColumn int

One-based index of the last column to convert.

UngroupByColumns(int, int)

Ungroups columns.

public CellRange UngroupByColumns(int firstColumn, int lastColumn)

Parameters

firstColumn int

The first column index to be grouped.

lastColumn int

The last column index to be grouped.

Returns

CellRange

UngroupByRows(int, int)

Ungroups rows.

public CellRange UngroupByRows(int firstRow, int lastRow)

Parameters

firstRow int

The first row index to be grouped.

lastRow int

The last row index to be grouped.

Returns

CellRange

Events

CellValueChanged

Occurs when the value of a cell changes.

public event XlsRange.CellValueChangedEventHandler CellValueChanged

Event Type

XlsRange.CellValueChangedEventHandler