IWorksheet module
- class IWorksheet.IWorksheet
Bases:
ITabSheet,IExcelApplication- abstract property ActivePane: int
- <summary>
Identifier of pane with active cell cursor.
</summary>
- abstract property AllocatedRange: IXLSRange
- <summary>
Returns a Range object that represents a cell or a range of cells.
</summary>
- abstract property AutoFilters: IAutoFilters
- <summary>
Returns collection of worksheet’s autofilters. Read-only.
</summary>
- abstract AutoFitColumn(columnIndex: int)
- <summary>
Autofits specified column.
<example>The following code illustrates how to Auto-fit the column: <code> //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”); </code> </example>
</summary> <param name=”columnIndex”>One-based column index.</param>
- abstract AutoFitRow(rowIndex: int)
- <summary>
Autofits specified row.
<example>The following code illustrates how to Auto-fit the row: <code> //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”); </code> </example>
</summary> <param name=”rowIndex”>One-based row index.</param>
- abstract property Cells: ListXlsRanges
- <summary>
Returns all used cells in the worksheet. Read-only.
</summary>
- abstract CheckExistence(iRow: int, iColumn: int) bool
- <summary>
Indicates whether a cell was initialized or accessed by the user.
<example>The following code illustrates if the cells was initialized or accessed by the user: <code> //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”); </code> </example>
</summary> <param name=”iRow”>One-based row index of the cell.</param> <param name=”iColumn”>One-based column index of the cell.</param> <returns>Value indicating whether the cell was initialized or accessed by the user.</returns>
- abstract Clear()
- <summary>
Clears worksheet data. Removes all formatting and merges.
</summary>
- abstract ClearData()
- <summary>
Clears worksheet. Only the data is removed from each cell.
</summary>
- abstract property CodeName: str
- <summary>
Name that is used by macros to access the workbook items.
</summary>
- abstract ColumnWidthToPixels(widthInChars: float) int
- <summary>
Converts column width into pixels.
</summary> <param name=”widthInChars”>Width in characters.</param> <returns>Width in pixels</returns>
- abstract property Columns: ListXlsRanges
- <summary>
- For a Worksheet object, returns an array of Range objects that represents
all the columns on the specified worksheet. Read-only Range object.
</summary>
- abstract property Comments: IComments
- <summary>
Comments collection.
<example>The following code illustrates how to access the comments collection in the worksheet: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Adding comments to a cell. ICommentShape comment1 = worksheet.Range[“A1”].AddComment(); ICommentShape comment2 = worksheet.Range[“B1”].AddComment(); //Set comment text comment1.Text = “Comment1”; comment2.Text = “Comment2”; //Check count Console.Write(worksheet.Comments.Count); //Save to file workbook.SaveToFile(“Comments.xlsx”); </code> </example>
</summary>
- abstract CopyToClipboard()
- <summary>
Copies worksheet into the clipboard.
</summary>
- abstract CreateNamedRanges(namedRange: str, referRange: str, vertical: bool)
- abstract property DefaultColumnWidth: float
- <summary>
- Returns or sets the standard (default) width of all the columns in the
worksheet. Read/write Double.
<example>The following code illustrates how to get the default column width: <code> //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”); </code> </example>
</summary>
- abstract property DefaultRowHeight: float
- <summary>
- Returns the standard (default) height of all the rows in the worksheet,
in points. Read/write Double.
<example>The following code illustrates how to get the default row height: <code> //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”); </code> </example>
</summary>
- abstract DeleteColumn(index: int)
- <summary>
Removes specified column (with formulas update).
</summary> <param name=”index”>One-based column index to remove.</param>
- abstract DeleteRow(index: int)
- <summary>
Removes specified row (with formulas update).
</summary> <param name=”index”>One-based row index to remove.</param>
- abstract property DisplayPageBreaks: bool
- <summary>
- True if page breaks (both automatic and manual) on the specified
worksheet are displayed. Read / write Boolean.
</summary>
- abstract property FirstVisibleColumn: int
- <summary>
Index to first visible column in right pane(s).
</summary>
- abstract property FirstVisibleRow: int
- <summary>
Index to first visible row in bottom pane(s).
</summary>
- abstract property FormulasVisible: bool
- abstract GetBoolean(row: int, column: int) bool
- <summary>
Gets bool value from cell.
</summary> <param name=”row”>Represents row index.</param> <param name=”column”>Represents column index.</param> <returns>Returns found bool value. If cannot found returns false.</returns>
- abstract GetColumnWidthPixels(Column: int) int
- <summary>
- Returns width in pixels from ColumnInfoRecord if there is corresponding ColumnInfoRecord
or StandardWidth if not.
<example>The following code illustrates how to get the column width for a particular column: <code> //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”); </code> </example>
</summary> <param name=”Column”>One-based index of the column.</param> <returns>Width in pixels of the specified column.</returns>
- abstract GetDefaultColumnStyle(iColumnIndex: int) IStyle
- <summary>
Returns default column style.
<example>The following code illustrates how to get default column style: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Create style CellStyle style = workbook.Styles.Add(“CustomStyle”); //Set Color style.Color = Color.Red; //Set default style worksheet.SetDefaultColumnStyle(2,style); //Get default style CellStyle defaultStyle = worksheet.GetDefaultColumnStyle(2); //Set color defaultStyle.Color = Color.Blue; worksheet.SetDefaultColumnStyle(3, defaultStyle); //Save to file workbook.SaveToFile(“GetDefaultColumnStyle.xlsx”); </code> </example>
</summary> <param name=”iColumnIndex”>Column index.</param> <returns>Default column style or null if style wasn’t set.</returns>
- abstract GetDefaultRowStyle(rowIndex: int) IStyle
- <summary>
Returns default row style.
<example>The following code illustrates how to get default row style: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Create style CellStyle style = workbook.Styles.Add(“CustomStyle”); //Set Color style.Color = Color.Red; //Set default style worksheet.SetDefaultRowStyle(2,style); //Get default style CellStyle defaultStyle = worksheet.GetDefaultRowStyle(2); //Set color defaultStyle.Color = Color.Blue; worksheet.SetDefaultRowStyle(3, defaultStyle); //Save to file workbook.SaveToFile(“GetDefaultColumnStyle.xlsx”); </code> </example>
</summary> <param name=”rowIndex”>Row index.</param> <returns>Default row style or null if style wasn’t set.</returns>
- abstract GetError(row: int, column: int) str
- <summary>
Gets error value from cell.
</summary> <param name=”row”>Row index.</param> <param name=”column”>Column index.</param> <returns>Returns error value or null.</returns>
- abstract GetFormula(row: int, column: int, bR1C1: bool) str
- <summary>
Returns formula value corresponding to the cell.
</summary> <param name=”row”>One-based row index of the cell to get value from.</param> <param name=”column”>One-based column index of the cell to get value from.</param> <param name=”bR1C1”>Indicates whether R1C1 notation should be used.</param> <returns>Formula contained by the cell.</returns>
- abstract GetFormulaBoolValue(row: int, column: int) bool
- <summary>
Gets formula bool value from cell.
</summary> <param name=”row”>Represents row index.</param> <param name=”column”>Represents column index.</param> <returns>Returns found bool value. If cannot found returns false.</returns>
- abstract GetFormulaErrorValue(row: int, column: int) str
- <summary>
Gets formula error value from cell.
</summary> <param name=”row”>Row index.</param> <param name=”column”>Column index.</param> <returns>Returns error value or null.</returns>
- abstract GetFormulaNumberValue(row: int, column: int) float
- <summary>
Returns formula number value corresponding to the cell.
</summary> <param name=”row”>One-based row index of the cell to get value from.</param> <param name=”column”>One-based column index of the cell to get value from.</param> <returns>Number contained by the cell.</returns>
- abstract GetFormulaStringValue(row: int, column: int) str
- <summary>
Returns formula string value corresponding to the cell.
</summary> <param name=”row”>One-based row index of the cell to get value from.</param> <param name=”column”>One-based column index of the cell to get value from.</param> <returns>String contained by the cell.</returns>
- abstract GetNumber(row: int, column: int) float
- <summary>
Returns number value corresponding to the cell.
</summary> <param name=”row”>One-based row index of the cell to get value from.</param> <param name=”column”>One-based column index of the cell to get value from.</param> <returns>Number contained by the cell.</returns>
- abstract GetRowHeightPixels(Row: int) int
- <summary>
- Returns height from RowRecord if there is a corresponding RowRecord.
Otherwise returns StandardHeight.
<example>The following code illustrates how to get the row height for a particular row: <code> //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”); </code> </example>
</summary> <param name=”Row”>One-bazed index of the row.</param> <returns>
Height in pixels from RowRecord if there is corresponding RowRecord. Otherwise returns StandardHeight. </returns>
- abstract GetText(row: int, column: int) str
- <summary>
Returns string value corresponding to the cell.
</summary> <param name=”row”>One-based row index of the cell to get value from.</param> <param name=”column”>One-based column index of the cell to get value from.</param> <returns>String contained by the cell.</returns>
- abstract property GridLineColor: ExcelColors
- <summary>
Gets / sets Grid line color.
<example>The following code illustrates how to set the grid line color: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set grid lines color worksheet.GridLineColor = ExcelColors.Red; //Save to file workbook.SaveToFile(“GridLineColor.xlsx”); </code> </example>
</summary>
- abstract property GridLinesVisible: bool
- <summary>
- True if gridlines are visible;
False otherwise.
<example>The following code illustrates how to set visibility for grid lines: <code> //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”); </code> </example>
</summary>
- abstract property HPageBreaks: IHPageBreaks
- <summary>
- Returns an HPageBreaks collection that represents the horizontal
page breaks on the sheet. Read-only.
</summary>
- abstract property HasOleObjects: bool
- <summary>
Gets or sets a value indicating whether this instance is OLE object.
<example>The following code illustrates how to access the IListObjects collection in the worksheet to add a new IOleObject and check Ole Object: <code> //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.</para>
Console.Write(worksheet.HasOleObjects);
<para>//Save to file
workbook.SaveToFile(“HasOleObjects.xlsx”); </code> </example>
</summary>
- <value>
- <c>true</c> if this instance is OLE object; otherwise, <c>false</c>.
</value>
- abstract property HorizontalSplit: int
- <summary>
Gets or sets the position of horizontal split in the worksheet.
</summary>
- <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) </remarks>
- abstract property HyperLinks: IHyperLinks
- <summary>
Collection of all worksheet’s hyperlinks.
</summary>
- abstract property Index: int
- <summary>
- Returns the index number of the object within the collection of
similar objects. Read-only.
</summary>
- InsertArray
- <summary>
Imports an array of objects into a worksheet.
<example>The following code illustrates how to Imports an array of Object into a worksheet with specified alignment: <code> //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”); </code> </example>
</summary> <param name=”arrObject”>Array to import.</param> <param name=”firstRow”>Row of the first cell where array should be imported.</param> <param name=”firstColumn”>Column of the first cell where array should be imported.</param> <param name=”isVertical”>True if array should be imported vertically; False - horizontally.</param> <returns>Number of imported elements.</returns>
- abstract IsColumnVisible(columnIndex: int) bool
- <summary>
Method check is Column with specifed index visible to end user or not.
</summary> <param name=”columnIndex”>Index of column.</param> <returns>True - column is visible; otherwise False.</returns>
- abstract property IsDisplayZeros: bool
- <summary>
- True if zero values to be displayed
False otherwise.
</summary>
- abstract IsRowVisible(rowIndex: int) bool
- <summary>
Method check is Row with specifed index visible to user or not.
</summary> <param name=”rowIndex”>Index of row visibility of each must be checked.</param> <returns>True - row is visible to user, otherwise False.</returns>
- abstract property IsStringsPreserved: bool
- <summary>
Indicates if all values in the workbook are preserved as strings.
</summary>
- abstract property LeftVisibleColumn: int
- <summary>
Gets/sets left visible column of the worksheet.
<example>The following code illustrates how to set the left visible column: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set left visible column worksheet.LeftVisibleColumn = 3; //Get left visible column Console.Write(worksheet.LeftVisibleColumn); //Save to file workbook.SaveToFile(“LeftVisibleColumn.xlsx”); </code> </example>
</summary>
- abstract property ListObjects: IListObjects
- <summary>
Gets collection of all list objects in the worksheet.
</summary>
- abstract property MergedCells: ListXlsRanges
- <summary>
Returns all merged ranges. Read-only.
<example>The following code illustrates how to get the merged ranges: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Merge cells worksheet[“C2:D2”].Merge(); worksheet[“F3:G3”].Merge(); //Get merged ranges IXLSRange[] mergedRanges = worksheet.MergedCells; //Get merged range count . Output will be 2 Console.Write(mergedRanges.Length); //Save to file workbook.SaveToFile(“MergedCells.xlsx”); </code> </example>
</summary>
- abstract MoveWorksheet(iNewIndex: int)
- <summary>
Moves worksheet.
</summary> <param name=”iNewIndex”>New index of the worksheet.</param>
- abstract property Names: INameRanges
- <summary>
- For a Worksheet object, returns a Names collection that represents
all the worksheet-specific names (names defined with the “WorksheetName!” prefix). Read-only Names object.
</summary>
- abstract property OleObjects: IOleObjects
- <summary>
Gets the OLE objects.
<example>The following code illustrates how to access the IListObjects collection in the worksheet to add a new IOleObject: <code> //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”); </code> </example>
</summary>
<value>The OLE objects.</value>
- abstract property PageSetup: IPageSetup
- <summary>
- Returns a PageSetup object that contains all the page setup settings
for the specified object. Read-only.
</summary>
- abstract property PivotTables: PivotTablesCollection
- <summary>
Returns pivot table collection containing all pivot tables in the worksheet. Read-only.
</summary>
- abstract PixelsToColumnWidth(pixels: float) float
- <summary>
Converts pixels into column width (in characters).
</summary> <param name=”pixels”>Width in pixels</param> <returns>Widht in characters.</returns>
- abstract Protect(password: str)
- <summary>
Protects worksheet’s content with password.
<example>The following code illustrates how to protect the sheet except select lock/unlock cells: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Protects the first worksheet’s content with password worksheet.Protect(“123456”); //Save to file workbook.SaveToFile(“Protect.xlsx”); </code> </example>
</summary> <param name=”password”>Password to protect with.</param>
- abstract property Range: XlsRange
- <summary>
- Returns a Range object that represents the used range on the
specified worksheet. Read-only.
<example>The following code illustrates how to get used range on the specified worksheet: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“B2”].Text = “Text”; //Set Color worksheet[“J3”].Style.Color = Color.Red; //Get used range . Output will be B2:J3 Console.Write(worksheet.Range.RangeAddressLocal); //Save to file workbook.SaveToFile(“UsedRange.xlsx”); </code> </example>
</summary>
- abstract Remove()
- <summary>
Removes worksheet from parent worksheets collection.
</summary>
- abstract RemovePanes()
- <summary>
Removes panes from a worksheet.
</summary>
- Replace
- <summary>
Replaces specified string by specified value.
<example>The following code snippet illustrates how to replace the string with another string: <code> //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”); </code> </example>
</summary> <param name=”oldValue”>String value to replace.</param> <param name=”newValue”>New value for the range with specified string.</param>
- abstract property RowColumnHeadersVisible: bool
- <summary>
- True if row and column headers are visible;
False otherwise.
</summary>
- abstract property Rows: ListXlsRanges
- <summary>
- For a Worksheet object, returns an array of Range objects that represents
all the rows on the specified worksheet. Read-only Range object.
</summary>
- abstract SaveToFile(fileName: str, separator: str)
- <summary>
Save tabsheet using separator.
</summary>
- <example>The following code illustrates how to saves the worksheet in a different file with separator:
<code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Save to file worksheet.SaveToFile(“SaveToFile.csv” , “,”);</para></code></example>
<param name=”fileName”>File to save.</param> <param name=”separator”>Current seperator.</param>
- SaveToHtml
- <summary>
- Saves worksheet with specified filename.
<example>The following code snippets illustrates how to save as html to the specified file name: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Save to HTML file worksheet.SaveToHtml(“Output.html”); </code> </example>
</summary> <param name=”filename”>File to save.</param>
- SaveToImage
- <summary>
Converts range into image (Bitmap).
</summary> <param name=”firstRow”>One-based index of the first row to convert.</param> <param name=”firstColumn”>One-based index of the first column to convert.</param> <param name=”lastRow”>One-based index of the last row to convert.</param> <param name=”lastColumn”>One-based index of the last column to convert.</param> <returns></returns>
- abstract SaveToStream(stream: Stream, separator: str)
- <summary>
- Save tabsheet using separator.
<example>The following code illustrates how to saves the worksheet as stream with separator: <code>
//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 , “,”); </code> </example>
</summary> <param name=”stream”>Stream to save. </param> <param name=”separator”>Current seperator.</param>
- abstract SetBlank(iRow: int, iColumn: int)
- <summary>
Sets blank in specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param>
- abstract SetBoolean(iRow: int, iColumn: int, value: bool)
- <summary>
Sets value in the specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param> <param name=”value”>Value to set.</param>
- abstract SetColumnWidthInPixels(columnIndex: int, value: int)
- <summary>
Sets column width in pixels.
<example>The following code illustrates how to set width for a column: <code> //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”); </code> </example>
</summary> <param name=”columnIndex”>One-based column index.</param> <param name=”value”>Width to set.</param>
- SetDefaultColumnStyle
- <summary>
Sets by column index default style for column.
<example>The following code illustrates how to set the default style for a column: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Create style CellStyle style = workbook.Styles.Add(“CustomStyle”); //Set Color style.Color = Color.Red; //Set default style worksheet.SetDefaultColumnStyle(2, style); //Save to file workbook.SaveToFile(“SetDefaultColumnStyle.xlsx”); </code> </example>
</summary> <param name=”iColumnIndex”>Column index.</param> <param name=”defaultStyle”>Default style.</param>
- SetDefaultRowStyle
- <summary>
Sets by column index default style for row.
<example>The following code illustrates how to set the default style for a row: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Create style CellStyle style = workbook.Styles.Add(“CustomStyle”); //Set Color style.Color = Color.Red; //Set default style worksheet.SetDefaultRowStyle(2, style); //Save to file workbook.SaveToFile(“SetDefaultRowStyle.xlsx”); </code> </example>
</summary> <param name=”rowIndex”>Row index.</param> <param name=”defaultStyle”>Default style.</param>
- abstract SetError(iRow: int, iColumn: int, value: str)
- <summary>
Sets error in the specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param> <param name=”value”>Error to set.</param>
- abstract SetFormula(iRow: int, iColumn: int, value: str)
- <summary>
Sets formula in the specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param> <param name=”value”>Formula to set.</param>
- abstract SetFormulaBoolValue(iRow: int, iColumn: int, value: bool)
- <summary>
Sets formula bool value.
</summary> <param name=”iRow”>One based row index.</param> <param name=”iColumn”>One based column index.</param> <param name=”value”>Represents formula bool value for set.</param>
- abstract SetFormulaErrorValue(iRow: int, iColumn: int, value: str)
- <summary>
Sets formula error value.
</summary> <param name=”iRow”>One based row index.</param> <param name=”iColumn”>One based column index.</param> <param name=”value”>Represents formula error value for set.</param>
- abstract SetFormulaNumberValue(iRow: int, iColumn: int, value: float)
- <summary>
Sets formula number value.
</summary> <param name=”iRow”>One based row index.</param> <param name=”iColumn”>One based column index.</param> <param name=”value”>Represents formula number value for set.</param>
- abstract SetFormulaStringValue(iRow: int, iColumn: int, value: str)
- <summary>
Sets formula string value.
</summary> <param name=”iRow”>One based row index.</param> <param name=”iColumn”>One based column index.</param> <param name=”value”>Represents formula string value for set.</param>
- abstract SetNumber(iRow: int, iColumn: int, value: float)
- <summary>
Sets value in the specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param> <param name=”value”>Value to set.</param>
- abstract SetRowHeightPixels(Row: int, value: float)
- <summary>
Sets row height in pixels.
<example>The following code illustrates how to set height for a row: <code> //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”); </code> </example>
</summary> <param name=”Row”>One-based row index to set height.</param> <param name=”value”>Value in pixels to set.</param>
- abstract SetText(iRow: int, iColumn: int, value: str)
- <summary>
Sets text in the specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param> <param name=”value”>Text to set.</param>
- abstract SetValue(iRow: int, iColumn: int, value: str)
- <summary>
Sets value in the specified cell.
</summary> <param name=”iRow”>One-based row index of the cell to set value.</param> <param name=”iColumn”>One-based column index of the cell to set value.</param> <param name=”value”>Value to set.</param>
- abstract property TopVisibleRow: int
- <summary>
Gets/sets top visible row of the worksheet.
<example>The following code illustrates how to set the top visible row: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set top visible row worksheet.TopVisibleRow = 5; //Get top visible row Console.Write(worksheet.TopVisibleRow); //Save to file workbook.SaveToFile(“TopVisibleRow.xlsx”); </code> </example>
</summary>
- abstract property Type: ExcelSheetType
- <summary>
Returns or sets the worksheet type. Read-only ExcelSheetType.
</summary>
- abstract Unprotect(password: str)
- <summary>
Unprotects worksheet’s content with password.
</summary> <param name=”password”>Password to unprotect.</param>
- abstract property UseRangesCache: bool
- <summary>
Indicates whether all created range objects should be cached. Default value is false.
</summary>
- abstract property VPageBreaks: IVPageBreaks
- <summary>
- Returns a VPageBreaks collection that represents the vertical page
breaks on the sheet. Read-only.
</summary>
- abstract property VerticalSplit: int
- <summary>
Gets or sets the position of vertical split in the worksheet.
</summary>
- <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) </remarks>
- abstract property Zoom: int
- <summary>
Zoom factor of document. Value must be in range from 10 till 400.
<example>The following code illustrates how to set zoom level of the sheet: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set zoom worksheet.Zoom = 200; //Save to file workbook.SaveToFile(“Zoom.xlsx”); </code> </example>
</summary>
- abstract add_CellValueChanged(value: CellValueChangedEventHandler)
- get_Item
- <summary>
Gets / sets cell by row and index.
</summary>
- abstract remove_CellValueChanged(value: CellValueChangedEventHandler)