XlsRange module
- class XlsRange.XlsRange
Bases:
XlsObject,ICombinedRange,IEnumerable[IXLSRange]- Activate
- <summary>
- Activates a single cell, scroll to it and activates the corresponding sheet.
To select a range of cells, use the Select method.
<example>The following code illustrates how to activate a Range with scroll flag: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Activates ‘F1’ cell. worksheet.Range[“F1”].Activate(true); //Save to file workbook.SaveToFile(“Activate.xlsx”); </code> </example>
</summary> <param name=”scroll”>True to scroll to the cell</param> <returns>Returns the active cell.</returns>
- AddComment
- ApplyStyle(style: IStyle, flag: CellStyleFlag)
- AutoFitColumns()
- <summary>
Changes the width of the columns in the range in the range to achieve the best fit.
<example>The following code illustrates how to auto-size column width to its cell content: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Auto-fit columns worksheet.Range[“B4”].Text = “Fit the content to column”; worksheet.Range[“B4”].AutoFitColumns(); //Save to file workbook.SaveToFile(“AutoFitRows.xlsx”); </code> </example>
</summary>
- AutoFitRows()
- <summary>
Changes the width of the height of the rows in the range to achieve the best fit.
<example>The following code illustrates how to auto-size row height to its cell content: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Auto-fit rows worksheet.Range[“A2”].Text = “Fit the content to row”; worksheet.Range[“A2”].IsWrapText = true; worksheet.Range[“A2”].AutoFitRows(); //Save to file workbook.SaveToFile(“AutoFitRows.xlsx”); </code> </example>
</summary>
- property BooleanValue: bool
- <summary>
Returns or sets the bool value of the specified range.
<example>The following code illustrates how to access Boolean property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set and get BooleanValue worksheet.Range[2, 4].BooleanValue = true; bool boolean = worksheet.Range[2, 4].BooleanValue; </code> </example>
</summary>
- BorderAround
- <summary>
Sets around border for current range.
<example>The following code illustrates how to apply border around the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“C2”].Text = “Sample”; worksheet[“D2”].Text = “text”; worksheet[“C3”].Text = “in”; worksheet[“D3”].Text = “cell”; //Set border worksheet[“C2:D3”].BorderAround(); //Save to file workbook.SaveToFile(“BorderAround.xlsx”); </code> </example>
</summary>
- BorderInside
- <summary>
Sets inside border for current range.
<example>The following code illustrates how to apply border inside the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“C2”].Text = “Sample”; worksheet[“D2”].Text = “text”; worksheet[“C3”].Text = “in”; worksheet[“D3”].Text = “cell”; //Set border worksheet[“C2:D3”].BorderInside(); //Save to file workbook.SaveToFile(“BorderInside.xlsx”); </code> </example>
</summary>
- BorderNone()
- <summary>
Sets none border for current range.
<example>The following code illustrates how to remove borders in the Range: <code> //Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Remove borders worksheet[“C2”].BorderNone(); //Save to file workbook.SaveToFile(“BorderNone.xlsx”); </code> </example>
</summary>
- property Borders: IBorders
- property BuiltInStyle: BuiltInStyles
- <summary>
Gets/sets built in style.
<example>The following code illustrates how to access BuiltInStyle property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“C2”].Text = “Sample”; //Set built in style worksheet[“C2”].BuiltInStyle = BuiltInStyles.Accent3; //Save to file workbook.SaveToFile(“BuiltInStyle.xlsx”); </code> </example>
</summary>
- CalculateAllValue()
- <summary>
Caculate all formula for the specified range
</summary>
- property CellStyleName: str
- <summary>
Gets/sets name of the style for the current range.
<example>The following code illustrates how to access CellStyleName of the specified range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Add and set style CellStyle style = workbook.Styles.Add(“CustomStyle”); worksheet[“C2”].Style = style; //Check Style name Console.Write(worksheet[“C2”].CellStyleName); </code> </example>
</summary>
- property Cells: ListXlsRanges
- property CellsCount: int
- <summary>
Gets number of cells.
</summary>
- Clear(option: ExcelClearOptions)
- <summary>
Clears the cell based on clear options.
<example>The following code illustrates how to clear the Range with clear options: <code> //Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Clears the Range C2 with its clear options worksheet.Range[“C2”].Clear(ExcelClearOptions.ClearAll); //Save to file workbook.SaveToFile(“ClearContents.xlsx”); </code> </example>
</summary> <param name=”option”>Represents the clear options.</param>
- ClearAll()
- <summary>
Clears the entire object.
</summary>
- ClearConditionalFormats()
- <summary>
Clears conditional formats.
</summary>
- ClearContents()
- <summary>
Clear the contents of the Range.
<example>The following code illustrates how to clear the Range: <code> //Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Clears the Range C2 worksheet.Range[“C2”].ClearContents(); //Save to file workbook.SaveToFile(“ClearContents.xlsx”); </code> </example>
</summary>
- CollapseGroup(groupBy: GroupByType)
- <summary>
Collapses current group.
<example>The following code illustrates how to remove borders in the Range: <code> //Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Collapse group worksheet.Range[“A5:A15”].CollapseGroup(GroupByType.ByRows); //Save to file workbook.SaveToFile(“CollapseGroup.xlsx”); </code> </example>
</summary> <param name=”groupBy”>
This parameter specifies whether the grouping should be performed by rows or by columns.
</param>
- property Column: int
- <summary>
- Returns the number of the first column in the first area in the specified range.
<example>The following code illustrates how to access Column property of the Range: <code>
//Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get specified column int firstColumn = worksheet[“E1:R3”].Column; </code> </example>
</summary>
- property ColumnCount: int
- <summary>
Gets number of columns.
</summary>
- property ColumnGroupLevel: int
- <summary>
Column group level.
</summary>
- <remarks>
- -1 - column group is not same.
0 - Not group 1 - 7 - group level.
</remarks>
- property ColumnWidth: float
- <summary>
- Returns or sets the width of all columns in the specified range.
<example>The following code illustrates how to set the width of all columns in the specified range: <code>
//Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set the ColumnWidth worksheet[“A1”].Text = “This cell contains sample text”; worksheet[“A1”].ColumnWidth = 25; //Save to file workbook.SaveToFile(“ColumnWidth.xlsx”); </code> </example>
</summary>
- property Columns: ListXlsRanges
- property CombinedAddress: str
- <summary>
- Returns the combined range reference in the language.
Read-only String.
</summary>
- property Comment: ICommentShape
- <summary>
Returns a Comment object that represents the comment associated with the cell in the upper-left corner of the range.
</summary>
- property ConditionalFormats: ConditionalFormats
- ConvertToNumber()
- <summary>
Convert number that stored as text to number
</summary>
- CopyToClipboard()
- property Count: int
- <summary>
Returns the number of objects in the collection.
</summary>
- property CurrentRegion: IXLSRange
- <summary>
Get the range associated with a range.
</summary>
- static DEF_MAX_HEIGHT() float
- property DataValidation: Validation
- <summary>
Get dataValidation of the sheet. Read Only.
<example>The following code illustrates how to access DataValidation property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Data validation for number IDataValidation validation = worksheet.Range[“A3”].DataValidation; validation.AllowType = CellDataType.Integer; //Value between 0 to 10 validation.CompareOperator = ValidationComparisonOperator.Between; validation.Formula1 = “0”; validation.Formula2 = “10”; //Save to file workbook.SaveToFile(“DataValidation.xlsx”); </code> </example>
</summary>
- property DateTimeValue: DateTime
- <summary>
- Gets/sets DateTime value of the range.
<example>The following code illustrates how to set and access DateTimeValue property of the Range: <code>
//Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set and get the DateTimeValue of specified range worksheet.Range[2, 4].DateTimeValue = DateTime.Now; DateTime dateTime = worksheet.Range[2, 4].DateTimeValue; //Save to file workbook.SaveToFile(“DateTimeValue.xlsx”); </code> </example>
</summary>
- property DisplayedText: str
- <summary>
Gets cell displayed text.
</summary>
- Dispose()
- property EndCell: IXLSRange
- property EntireColumn: IXLSRange
- property EntireRow: IXLSRange
- <summary>
- Returns a Range object that represents the entire row (or
rows) that contains the specified range. Read-only.
</summary>
- property EnvalutedValue: str
- <summary>
Returns the calculated value of a formula.
<example>The following code illustrates how to access a calculated value: <code> //Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Returns the calculated value of a formula using the most current inputs string calculatedValue = worksheet[“C1”].EnvalutedValue; Console.WriteLine(calculatedValue); </code> </example>
</summary>
- property ErrorValue: str
- <summary>
Gets or sets error value of this range.
</summary>
- ExpandGroup
- <summary>
Expands current group.
<example>The following code illustrates how to expand the group in the Range: <code> //Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Expand group with flag set to expand parent worksheet.Range[“A5:A15”].ExpandGroup(GroupByType.ByRows); //Save to file workbook.SaveToFile(“ExpandGroup.xlsx”); </code> </example>
</summary> <param name=”groupBy”>
This parameter specifies whether the grouping should be performed by rows or by columns.
</param>
- property ExtendedFormatIndex: UInt16
- property Formula: str
- <summary>
- Returns or sets the object’s formula in A1-style notation and in
the language of the macro.
</summary>
- property FormulaArray: str
- <summary>
Returns or sets the array formula of a range.
<example>The following code illustrates how to set and access FormulaArray property of the range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Assign array formula worksheet.Range[“A1:D1”].FormulaArray = “{1,2,3,4}”; //Adding a named range for the range A1 to D1 worksheet.Names.Add(“ArrayRange”, worksheet.Range[“A1:D1”]); //Assign formula array with named range worksheet.Range[“A2:D2”].FormulaArray = “ArrayRange+100”; //Save to file workbook.SaveToFile(“FormulaArray.xlsx”); </code> </example>
</summary>
- property FormulaArrayR1C1: str
- <summary>
Returns or sets the formula for the object, using R1C1-style notation in the language of the macro
</summary>
- property FormulaBoolValue: bool
- property FormulaDateTime: DateTime
- <summary>
Gets or sets bool value of the formula.
</summary>
- property FormulaErrorValue: str
- <summary>
Gets or sets error value of the formula.
</summary>
- property FormulaNumberValue: float
- <summary>
Gets or sets double value of the formula.
</summary>
- property FormulaR1C1: str
- <summary>
Returns or sets the formula for the object, using R1C1-style notation in the language of the macro
</summary>
- property FormulaStringValue: str
- <summary>
Gets or sets string value of the range.
</summary>
- property FormulaValue: str
- <summary>
Gets formula value.
</summary>
- FreezePanes()
- <summary>
Freezes panes at the current range in the worksheet. current range should be single cell range.
<example>The following code illustrates how to freeze a pane in the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Applying Freeze Pane to the sheet by specifying a cell worksheet.Range[“B2”].FreezePanes(); //Save to file workbook.SaveToFile(“FreezePanes.xlsx”); </code> </example>
</summary>
- GetConditionFormatsStyle() CellStyle
- <summary>
- Get the calculated condition format style of current Range.
If style of every cell is not same, return null. If current range without condition format, return null.
</summary>
- GetEnumerator() EnumeratorXlsRange
- GetRectangles() List[Rectangle]
- <summary>
Gets rectangle information of current range.
</summary> <returns>Rectangles information</returns>
- GetRectanglesCount() int
- <summary>
Returns number of rectangles..
</summary> <returns>Number of rectangles.</returns>
- GroupByColumns(isCollapsed: bool) XlsRange
- <summary>
Groups columns.
</summary> <param name=”isCollapsed”>Indicates whether group should be collapsed.</param> <returns></returns>
- GroupByRows(isCollapsed: bool) XlsRange
- <summary>
Groups row.
</summary> <param name=”isCollapsed”>Indicates whether group should be collapsed.</param> <returns></returns>
- property HasBoolean: bool
- <summary>
Indicates whether range contains bool value.
<example>The following code illustrates how to set and access HasBoolean property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Assigning Value2 property of the Range worksheet[“A3”].Value2 = false; //Checking Range types bool isboolean = worksheet[“A3”].HasBoolean; //Save to file workbook.SaveToFile(“HasBoolean.xlsx”); </code> </example>
</summary>
- property HasComment: bool
- property HasConditionFormats: bool
- <summary>
Indicates whether each cell of the range has some conditional formatting.
</summary>
- property HasDataValidation: bool
- <summary>
- Indicates whether specified range object has data validation.
If Range is not single cell, then returns true only if all cells have data validation. Read-only.
</summary>
- property HasDateTime: bool
- <summary>
Determines if all cells in the range contain datetime.
<example>The following code illustrates how to set and access HasDateTime property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Assigning Value2 property of the Range worksheet[“A1”].Value2 = DateTime.Now; //Checking Range types bool isDateTime = worksheet[“A1”].HasDateTime; //Save to file workbook.SaveToFile(“HasDateTime.xlsx”); </code> </example>
</summary>
- property HasError: bool
- <summary>
Indicates whether range contains error value.
</summary>
- property HasExternalFormula: bool
- <summary>
Check if the formula in the range has external links. Read-only.
</summary>
- property HasFormula: bool
- <summary>
True if all cells in the range contain formulas;
</summary>
- property HasFormulaArray: bool
- <summary>
Determines if all cells in the range contain array-entered formula.
</summary>
- property HasFormulaBoolValue: bool
- <summary>
Determines if all cells in the range contain formula bool value..
</summary>
- property HasFormulaDateTime: bool
- <summary>
Indicates if current range has formula value formatted as DateTime. Read-only.
</summary>
- property HasFormulaErrorValue: bool
- <summary>
Determines if all cells in the range contain error value.
</summary>
- property HasFormulaNumberValue: bool
- <summary>
Indicates whether current range has formula number value.
</summary>
- property HasFormulaStringValue: bool
- property HasMerged: bool
- <summary>
Indicates whether this range is part of merged range.
<example>The following code illustrates how to access HasMerged property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“A1”].Text = “Sample text in cell”; //Set merge worksheet[“A1:B1”].Merge(); //Check merge Console.Write(worksheet[“A1:B1”].HasMerged); </code> </example>
</summary>
- property HasNumber: bool
- <summary>
Determines if any one cell in the range contain number.
<example>The following code illustrates how to set and access Value2 property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Assigning Value2 property of the Range worksheet[“A2”].Value2 = 45; //Checking Range types bool isNumber = worksheet[“A2”].HasNumber; //Save to file workbook.SaveToFile(“HasNumber.xlsx”); </code> </example>
</summary>
- property HasPictures: bool
- <summary>
Indicates whether the range is blank.
</summary>
- property HasRichText: bool
- <summary>
Determines if all cells in the range contain rich text string.
<example>The following code illustrates how to access HasRichText property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Create style IStyle style = workbook.Styles.Add(“CustomStyle”); //Set rich text IRichTextString richText = worksheet[“C2”].RichText; richText.Text = “Sample”; IFont font = style.Font; font.Color = Color.Red; richText.SetFont(0, 5, font); //Check HasRichText Console.Write(worksheet[“C2”].HasRichText); //Save to file workbook.SaveToFile(“HasRichText.xlsx”); </code> </example>
</summary>
- property HasString: bool
- <summary>
Determines if all cells in the range contain string.
</summary>
- property HasStyle: bool
- <summary>
Determines if all cells in the range contain differs from default style.
<example>The following code illustrates how to access HasStyle property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Add style CellStyle style = workbook.Styles.Add(“CustomStyle”); //Set color and style style.Color = Color.Red; worksheet[“C2”].Style = style; //Check HasStyle Console.Write(worksheet[“C2”].HasStyle); //Save to file workbook.SaveToFile(“HasStyle.xlsx”); </code> </example>
</summary>
- property HorizontalAlignment: HorizontalAlignType
- <summary>
Returns or sets the horizontal alignment for the specified object.
<example>The following code illustrates how to set and access HasStyle property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“A1”].Text = “Test”; //Set alignment worksheet[“A1”].HorizontalAlignment = HorizontalAlignType.Right; //Save to file workbook.SaveToFile(“HorizontalAlignment.xlsx”); </code> </example>
</summary>
- property HtmlString: str
- <summary>
Gets and sets the html string which contains data and some formattings in this cell.
</summary>
- property Hyperlinks: IHyperLinks
- <summary>
Returns hyperlinks for this range.
</summary>
- property IgnoreErrorOptions: IgnoreErrorType
- <summary>
Represents ignore error options. If not single cell returs concatenateed flags.
</summary>
- property IndentLevel: int
- <summary>
Returns or sets the indent level for the cell or range. value should be 0 between 15.
<example>The following code illustrates how to set indent level for a cell: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“C2”].Text = “Sample”; //Set indent level worksheet[“C2”].IndentLevel = 2; //Save to file workbook.SaveToFile(“IndentLevel.xlsx”); </code> </example>
</summary>
- Intersect(range: IXLSRange) IXLSRange
- <summary>
Returns intersection of this range with the specified one.
<example>The following code illustrates how to perform intersectwith in the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get intersect range IXLSRange range = worksheet.Range[“A16:C16”]; IXLSRange commonRange = worksheet.Range[“B16:D16”].Intersect(range); //Save to file workbook.SaveToFile(“Intersect.xlsx”); </code> </example>
</summary> <param name=”range”>The Range with which to intersect.</param> <returns>Range intersection. If there is no intersection, NULL is returned.</returns>
- property IsAllNumber: bool
- <summary>
Determines if all cells in the range contain number.
</summary>
- property IsBlank: bool
- <summary>
Indicates whether the range is blank.
</summary>
- property IsFormulaHidden: bool
- <summary>
Determines if the formula will be hidden when the worksheet is protected.
</summary>
- property IsGroupedByColumn: bool
- <summary>
Indicates whether this range is grouped by column.
</summary>
- property IsGroupedByRow: bool
- <summary>
Indicates whether this range is grouped by row.
</summary>
- property IsInitialized: bool
- <summary>
Indicates whether range has been initialized.
</summary>
- IsIntersect(range: IXLSRange) bool
- property IsStringsPreserved: bool
- <summary>
Indicates whether all values in the range are preserved as strings.
</summary>
- property IsWrapText: bool
- <summary>
Determines if Microsoft Excel wraps the text in the object.
<example>The following code illustrates how to access WrapText property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“A1”].Text = “This cell contains sample text”; //Set wrap text worksheet[“A1”].IsWrapText = true; //Save to file workbook.SaveToFile(“IsWrapText.xlsx”); </code> </example>
</summary>
- property LastColumn: int
- <summary>
Gets or sets last column of the range.
</summary>
- property LastRow: int
- <summary>
Gets or sets last row of the range.
</summary>
- MeasureString(measureString: str) SizeF
- <summary>
Measures size of the string.
</summary> <param name=”measureString”>String to measure.</param> <returns>Size of the string.</returns>
- Merge
- <summary>
Creates a merged cell from the specified Range object.
</summary> <param name=”range”>The Range to merge with.</param> <returns>Merged ranges or null if wasn’t able to merge ranges.</returns>
- property MergeArea: IXLSRange
- property NumberFormat: str
- <summary>
Returns or sets the format code for the object.
<example>The following code illustrates how to set NumberFormat property: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set data worksheet[“C2”].Value = “3100.23”; //Set number format worksheet[“C2”].NumberFormat = “#,##1.##”; //Save to file workbook.SaveToFile(“NumberFormat.xlsx”); </code> </example>
</summary>
- property NumberText: str
- <summary>
- Returns cell text for number format.
<example>The following code illustrates how to access NumberText property of the Range: <code>
//Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Gets cell value with its number format XlsRange range= worksheet.Range[3, 1]; range.Value = “1/1/2015”; range.NumberFormat = “dd-MMM-yyyy”; string numberText = range.NumberText; //Save to file workbook.SaveToFile(“NumberText.xlsx”); </code> </example>
</summary>
- property NumberValue: float
- <summary>
Gets or sets number value of the range.
</summary>
- property Parent: SpireObject
- PartialClear()
- <summary>
Partially clear range.
</summary>
- property RangeAddress: str
- <summary>
- Returns the range reference in the language of the macro.
Read-only String.
<example>The following code illustrates how to access Address property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get RangeAddress string address = worksheet.Range[3, 4].RangeAddress; </code> </example>
</summary>
- property RangeAddressLocal: str
- <summary>
Returns the range reference for the specified range in the language of the user.
<example>The following code illustrates how to access AddressLocal property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get RangeAddressLocal string address = worksheet.Range[3, 4].RangeAddressLocal; </code> </example>
</summary>
- property RangeGlobalAddress: str
- <summary>
Returns the range reference in the language of the macro.
<example>The following code illustrates how to access AddressGlobal property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get RangeAddress string address = worksheet.Range[3, 4].RangeGlobalAddress; </code> </example>
</summary>
- property RangeGlobalAddress2007: str
- <summary>
Gets address global in the format required by Excel 2007.
</summary>
- property RangeGlobalAddressWithoutSheetName: str
- <summary>
Return global address without worksheet name.
</summary>
- property RangeR1C1Address: str
- <summary>
Returns the range reference using R1C1 notation.
<example>The following code illustrates how to access AddressR1C1 property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get RangeR1C1Address string address = worksheet.Range[3, 4].RangeR1C1Address; </code> </example>
</summary>
- property RangeR1C1AddressLocal: str
- <summary>
Returns the range reference using R1C1 notation.
<example>The following code illustrates how to access AddressR1C1Local property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Get RangeR1C1AddressLocal string address = worksheet.Range[3, 4].RangeR1C1Address; </code> </example>
</summary>
- RemoveMergeComment()
- ReparseFormulaString()
- <summary>
Reparses formula.
</summary>
- Replace
- <summary>
Replaces cells’ values with new data.
</summary> <param name=”oldValue”>Value to search for.</param> <param name=”newValues”>The replacement value.</param> <param name=”isVertical”>Indicates whether to insert values vertically or horizontally.</param>
- property RichText: IRichTextString
- property Row: int
- <summary>
Returns the number of the first row of the first area in the range.
</summary>
- property RowCount: int
- <summary>
Gets number of rows.
</summary>
- property RowGroupLevel: int
- <summary>
Row group level.
</summary>
- <remarks>
- -1 - column group is not same.
0 - Not group 1 - 7 - group level.
</remarks>
- property RowHeight: float
- <summary>
Returns the height of all the rows in the range specified, measured in points.
<example>The following code illustrates how to set row height: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“A1”].Text = “Test”; //Set row height worksheet[“A1”].RowHeight = 30; //Save to file workbook.SaveToFile(“RowHeight.xlsx”); </code> </example>
</summary>
- property Rows: ListXlsRanges
- SetAutoFormat
- SetDataValidation(dv: XlsValidation)
- SetExtendedFormatIndex(index: int)
- SetRowHeight(rowHeight: float, bIsBadFontHeight: bool)
- property Style: IStyle
- property Text: str
- <summary>
Gets / sets text of range.
</summary>
- TextPartReplace(oldPartValue: str, newPartValue: str)
- <summary>
Replaces cell’s part text and reserve text’s format.
</summary> <param name=”oldPartValue”>Part value of cell’s text to search for.</param> <param name=”newPartValue”>The replacement value.</param>
- property TimeSpanValue: TimeSpan
- <summary>
Gets or sets timespan value of cell.
</summary>
- UnMerge()
- <summary>
Separates a merged area into individual cells.
<example>The following code illustrates how to UnMerge the merged cells: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“A1”].Text = “Merged cell”; //Merge cells worksheet[“A1:B1”].Merge(true); //Unmerge cells worksheet[“A1:B1”].UnMerge(); //Save to file workbook.SaveToFile(“UnMerge.xlsx”); </code> </example>
</summary>
- UpdateRange(startRow: int, startColumn: int, endRow: int, endColumn: int)
- <summary>
Update region of range
</summary> <param name=”startRow”>first Row</param> <param name=”startColumn”>first Column</param> <param name=”endRow”>last Row</param> <param name=”endColumn”>last Column</param>
- property Value: str
- <summary>
Returns or sets the value of the specified range.
<example>The following code illustrates how to set Value of the specified range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set value of the range XlsRange range= worksheet.Range[3, 1]; range.Value = “1/1/2015”; //Save to file workbook.SaveToFile(“Value.xlsx”); </code> </example>
</summary>
- property Value2: SpireObject
- <summary>
- Returns or sets the cell value.
It’s not use for current and datetime types.
<example>The following code illustrates how to access Value2 property of the Range: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Assigning Value2 property of the Range worksheet[“A1”].Value2 = DateTime.Now; worksheet[“A3”].Value2 = false; //Checking Range types Console.WriteLine(worksheet[“A1”].HasDateTime); Console.WriteLine(worksheet[“A3”].HasBoolean); </code> </example>
</summary>
- property VerticalAlignment: VerticalAlignType
- <summary>
Returns or sets the vertical alignment of the specified object.
<example>The following code illustrates how to set vertical alignment type: <code> //Create worksheet Workbook workbook = new Workbook(); Worksheet worksheet = workbook.Worksheets[0]; //Set text worksheet[“A1”].Text = “Test”; //Set alignment worksheet[“A1”].VerticalAlignment = VerticalAlignType.Top; //Save to file workbook.SaveToFile(“VerticalAlignment.xlsx”); </code> </example>
</summary>
- property Worksheet: IWorksheet
- <summary>
- Returns a worksheet object that represents the worksheet
containing the specified range.
</summary>
- property WorksheetName: str
- <summary>
Returns name of the parent worksheet.
</summary>
- get_Item
- set_Item(row: int, column: int, value: IXLSRange)