Click or drag to resize

CellRange Methods

The CellRange type exposes the following members.

Methods
Name Description
Public method Activate
Active single cell in the worksheet
Public method Code example Activate(Boolean)
Activates a single cell, scroll to it and activates the corresponding sheet. To select a range of cells, use the Select method.
Examples
The following code illustrates how to activate a Range with scroll flag:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Activates 'F1' cell.</para><para>worksheet.Range["F1"].Activate(true);</para><para>//Save to file</para><para>workbook.SaveToFile("Activate.xlsx");</para>
(Inherited from XlsRange .)
Public method AddCombinedRange
Adds a combined range to the collection if it is not already present.
(Inherited from XlsRange .)
Public method Code example AddComment
Adds a comment to the range.
Examples
The following code illustrates how to insert Comments in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Adding comments to a cell</para><para>ICommentShape comment = worksheet.Range["A1"].AddComment();</para><para>comment.Text= "Comments";</para><para>//Save to file</para><para>workbook.SaveToFile("AddComment.xlsx");</para>
Public method AddComment(Boolean)
Adds a comment to the range.
(Inherited from XlsRange .)
Public method AddComment(ExcelComment)
Adds a comment to the range.
Protected method AddComment(ICommentShape)
Adds a comment to the shape.
(Inherited from XlsRange .)
Protected method AddReference
Increase the quantity of reference. User must use this method when new wrapper on object is created or reference on object stored.
(Inherited from XlsObject .)
Public method AddSignatureLine
Add signature line to cell.
Public method ApplyStyle
Applies the specified style to the cells within the range, based on the given flag.
(Inherited from XlsRange .)
Public method Code example AutoFitColumns
Changes the width of the columns in the range in the range to achieve the best fit.
Examples
The following code illustrates how to auto-size column width to its cell content:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Auto-fit columns</para><para>worksheet.Range["B4"].Text = "Fit the content to column";</para><para>worksheet.Range["B4"].AutoFitColumns();</para><para>//Save to file</para><para>workbook.SaveToFile("AutoFitRows.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example AutoFitRows
Changes the width of the height of the rows in the range to achieve the best fit.
Examples
The following code illustrates how to auto-size row height to its cell content:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Auto-fit rows</para><para>worksheet.Range["A2"].Text = "Fit the content to row";</para><para>worksheet.Range["A2"].IsWrapText = true;</para><para>worksheet.Range["A2"].AutoFitRows();</para><para>//Save to file</para><para>workbook.SaveToFile("AutoFitRows.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderAround
Sets around border for current range.
Examples
The following code illustrates how to apply border around the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderAround();</para><para>//Save to file</para><para>workbook.SaveToFile("BorderAround.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderAround(LineStyleType)
Sets around border for current range.
Examples
The following code illustrates how to apply border around the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderAround(LineStyleType.Thick);</para><para>//Save to file</para><para>workbook.SaveToFile("BorderAround.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderAround(LineStyleType, ExcelColors)
Sets around border for current range.
Examples
The following code illustrates how to apply border around the Rangewith color from Spire.Xls.ExcelColors structure:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderAround(LineStyleType.Thick , ExcelColors.Red);</para><para>//Save to file</para><para>workbook.SaveToFile("BorderAround.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderAround(LineStyleType, Color)
Sets around border for current range.
Examples
The following code illustrates how to apply border around the Rangewith color from System.Drawing.Color structure:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderAround(LineStyleType.Thick , Color.Red);</para><para>//Save to file</para><para>workbook.SaveToFile("BorderAround.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderInside
Sets inside border for current range.
Examples
The following code illustrates how to apply border inside the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderInside();</para><para>//Save to file</para><para>workbook.SaveToFile("BorderInside.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderInside(LineStyleType)
Sets inside border for current range.
Examples
The following code illustrates how to apply border inside the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderInside(LineStyleType.Thick);</para><para>//Save to file</para><para>workbook.SaveToFile("BorderInside.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderInside(LineStyleType, ExcelColors)
Sets inside border for current range.
Examples
The following code illustrates how to apply border inside the Range with color from Spire.Xls.ExcelColors structure:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderInside(LineStyleType.Thick , ExcelColors.Red);</para><para>//Save to file</para><para>workbook.SaveToFile("BorderInside.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderInside(LineStyleType, Color)
Sets inside border for current range.
Examples
The following code illustrates how to apply border inside the Range with color from System.Drawing.Color structure:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["C2"].Text = "Sample";</para><para>worksheet["D2"].Text = "text";</para><para>worksheet["C3"].Text = "in";</para><para>worksheet["D3"].Text = "cell";</para><para>//Set border</para><para>worksheet["C2:D3"].BorderInside(LineStyleType.Thick , Color.Red);</para><para>//Save to file</para><para>workbook.SaveToFile("BorderInside.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example BorderNone
Sets none border for current range.
Examples
The following code illustrates how to remove borders in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Remove borders</para><para>worksheet["C2"].BorderNone();</para><para>//Save to file</para><para>workbook.SaveToFile("BorderNone.xlsx");</para>
(Inherited from XlsRange .)
Public method CalculateAllValue
Caculate all formula for the specified range
(Inherited from XlsRange .)
Protected method CheckDisposed
Checks whether object was disposed and throws exception if it was.
(Inherited from XlsObject .)
Protected method CheckRange
Checks if the given row and column indices are within the valid range of the book. Throws an ArgumentOutOfRangeException if the indices are out of range.
(Inherited from XlsRange .)
Protected method Clear(Boolean)
Clears the cells in the specified range and optionally resets the cell style to "Normal".
(Inherited from XlsRange .)
Public method Code example Clear(ExcelClearOptions)
Clears the cell based on clear options.
Examples
The following code illustrates how to clear the Range with clear options:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Clears the Range C2 with its clear options</para><para>worksheet.Range["C2"].Clear(ExcelClearOptions.ClearAll);</para><para>//Save to file</para><para>workbook.SaveToFile("ClearContents.xlsx");</para>
(Inherited from XlsRange .)
Public method ClearAll
Clears the entire object.
(Inherited from XlsRange .)
Public method ClearConditionalFormats
Clears conditional formats.
(Inherited from XlsRange .)
Public method Code example ClearContents
Clear the contents of the Range.
Examples
The following code illustrates how to clear the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Clears the Range C2</para><para>worksheet.Range["C2"].ClearContents();</para><para>//Save to file</para><para>workbook.SaveToFile("ClearContents.xlsx");</para>
(Inherited from XlsRange .)
Public method Clone(Object, Dictionary String, String , Workbook)
Clones current IXLSRange.
Public method Clone(Object, Dictionary String, String , XlsWorkbook)
Clones current IXLSRange.
(Inherited from XlsRange .)
Public method Code example CollapseGroup
Collapses current group.
Examples
The following code illustrates how to remove borders in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Collapse group</para><para>worksheet.Range["A5:A15"].CollapseGroup(GroupByType.ByRows);</para><para>//Save to file</para><para>workbook.SaveToFile("CollapseGroup.xlsx");</para>
(Inherited from XlsRange .)
Public method ConvertToNumber
Convert number that stored as text to number
(Inherited from XlsRange .)
Public method Copy(CellRange)
Copies the range to the specified range.
Public method Copy(CellRange, CopyRangeOptions)
Copies the range to the specified range.
Public method Copy(CellRange, Boolean)
Copies the range to the specified range.
Public method Copy(CellRange, Boolean, Boolean)
Copies the range to the specified range.
Public method CopyToClipboard Obsolete.
Copies range to the clipboard.
(Inherited from XlsRange .)
Public method Dispose
This method is called when disposing the object.
(Inherited from XlsRange .)
Public method Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object .)
Public method Code example ExpandGroup(GroupByType)
Expands current group.
Examples
The following code illustrates how to expand the group in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Expand group with flag set to expand parent</para><para>worksheet.Range["A5:A15"].ExpandGroup(GroupByType.ByRows);</para><para>//Save to file</para><para>workbook.SaveToFile("ExpandGroup.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example ExpandGroup(GroupByType, ExpandCollapseFlags)
Expands current group.
Examples
The following code illustrates how to perform ExpandGroup in the Range with collapse option:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Expand group with flag set to expand parent</para><para>worksheet.Range["A5:A15"].ExpandGroup(GroupByType.ByRows, ExpandCollapseFlags.ExpandParent);</para><para>//Save to file</para><para>workbook.SaveToFile("ExpandGroup.xlsx");</para>
(Inherited from XlsRange .)
Public method ExportDataTable
Exports the data from the worksheet to a DataTable based on the provided options.
(Inherited from XlsRange .)
Protected method Finalize
Destructor. Call dispose method of current object.
(Inherited from XlsObject .)
Protected method FindAll(Boolean)
Finds all cell ranges that match the specified value within the CellRange.
(Inherited from XlsRange .)
Protected method FindAll(DateTime)
Finds all occurrences of the specified DateTime value within the CellRange.
(Inherited from XlsRange .)
Protected method FindAll(TimeSpan)
Finds all occurrences of the specified TimeSpan value within the CellRange.
(Inherited from XlsRange .)
Protected method FindAll(Double, FindType)
Finds all occurrences of the specified value within the CellRange.
(Inherited from XlsRange .)
Protected method FindAll(String, FindType)
Finds all occurrences of the specified value within the CellRange.
(Inherited from XlsRange .)
Public method FindAll(String, FindType, ExcelFindOptions)
Finds the all ranges with specified string value.
Public method FindAllBool
Finds the cell with the input bool.
Public method FindAllDateTime
Finds the cell with the input datetime.
Public method FindAllNumber
Finds the cell with the input double.
Public method FindAllString
Finds the cell with the input string.
Public method FindAllTimeSpan
Finds the cell with input timespan
Public method FindBool
Finds the cell with the input bool.
Public method FindDateTime
Finds the cell with the input datetime.
Protected method FindFirst(Boolean)
Finds the first cell range that matches the specified value within the CellRange.
(Inherited from XlsRange .)
Protected method FindFirst(DateTime)
Searches for the first occurrence of a DateTime value within the specified area of the CellRange.
(Inherited from XlsRange .)
Protected method FindFirst(TimeSpan)
Finds the first occurrence of a specified TimeSpan value in the worksheet within the current area.
(Inherited from XlsRange .)
Protected method FindFirst(Double, FindType)
Finds the first occurrence of a specified value in the worksheet within the current area.
(Inherited from XlsRange .)
Protected method FindFirst(String, FindType)
Finds the first occurrence of a specified string value in the worksheet within the current area.
(Inherited from XlsRange .)
Public method FindNumber
Finds the cell with the input double.
Protected method FindParent(Type)
This method is used to find parent with specific type.
(Inherited from XlsObject .)
Protected method FindParent( Type )
Find parent of object.
(Inherited from XlsObject .)
Protected method FindParent(Type, Boolean)
This method is used to find parent with specific type.
(Inherited from XlsObject .)
Protected method FindParents
Finds parent objects.
(Inherited from XlsObject .)
Public method FindString
Finds the cell with the input string.
Public method FindTimeSpan
Finds the cell with the input time span.
Protected method FindWorksheet
Finds the worksheet by the given sheet name.
(Inherited from XlsRange .)
Public method Code example FreezePanes
Freezes panes at the current range in the worksheet. current range should be single cell range.
Examples
The following code illustrates how to freeze a pane in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Applying Freeze Pane to the sheet by specifying a cell</para><para>worksheet.Range["B2"].FreezePanes();</para><para>//Save to file</para><para>workbook.SaveToFile("FreezePanes.xlsx");</para>
(Inherited from XlsRange .)
Public method GetConditionFormatsStyle
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.
(Inherited from XlsRange .)
Public method GetDependentRanges
Retrieves the dependent ranges for a cell or a range of cells.
Public method GetEnumerator
Returns an enumerator that iterates through the collection of IXLSRange objects.
(Inherited from XlsRange .)
Public method GetHashCode
Serves as the default hash function.
(Inherited from Object .)
Public method GetNamedRange
Get the named range object of current Range.
(Inherited from XlsRange .)
Public method GetNewRangeLocation
Gets new range location.
(Inherited from XlsRange .)
Public method GetRectangles
Gets rectangle information of current range.
(Inherited from XlsRange .)
Public method GetRectanglesCount
Returns number of rectangles..
(Inherited from XlsRange .)
Public method GetReferRanges
Retrieves the reference ranges.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object .)
Public method GroupByColumns
Groups columns.
(Inherited from XlsRange .)
Public method GroupByRows
Groups row.
(Inherited from XlsRange .)
Protected method InfillCells
Infills cells based on the current range and updates the internal state.
(Inherited from XlsRange .)
Public method InsertOrUpdateCellImage(Stream, Boolean)
Adds CellImage from the specified file. this method only support WPS
(Inherited from XlsRange .)
Public method InsertOrUpdateCellImage(String, Boolean)
Adds CellImage from the specified file. this method only support WPS
(Inherited from XlsRange .)
Public method Intersect(CellRange)
Get intersection range with the specified range.
Public method Code example Intersect(IXLSRange)
Returns intersection of this range with the specified one.
Examples
The following code illustrates how to perform intersectwith in the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Get intersect range</para><para>IXLSRange range = worksheet.Range["A16:C16"];</para><para>IXLSRange commonRange = worksheet.Range["B16:D16"].Intersect(range);</para><para>//Save to file</para><para>workbook.SaveToFile("Intersect.xlsx");</para>
(Inherited from XlsRange .)
Public method IsIntersect
Determines if the current range intersects with the specified range.
(Inherited from XlsRange .)
Public method MeasureString
Measures size of the string.
(Inherited from XlsRange .)
Protected method MemberwiseClone
Creates a shallow copy of the current Object .
(Inherited from Object .)
Public method Code example Merge
Creates a merged cell from the specified Range object.
Examples
The following code illustrates how to merge the Range:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["A1"].Text = "Merged cell";</para><para>//Merge cells</para><para>worksheet["A1:B1"].Merge();</para><para>//Save to file</para><para>workbook.SaveToFile("Merge.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example Merge(Boolean)
Creates a merged cell from the specified Range object.
Examples
The following code illustrates how to merge the Range with clear option:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["A1"].Text = "Merged cell";</para><para>worksheet["B1"].Text = "sample";</para><para>//Merge cells</para><para>worksheet["A1:B1"].Merge(true);</para><para>//Save to file</para><para>workbook.SaveToFile("Merge.xlsx");</para>
(Inherited from XlsRange .)
Public method Code example Merge(CellRange)
Creates a merged cell from the specified Range object.
Examples
The following code illustrates how to check whether two ranges are mergable or not:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Merge range</para><para>worksheet["A2:B2"].Merge();</para><para>//Get mergable range</para><para>IXLSRange mergableRange = worksheet["A2"].MergeArea.Merge(worksheet["C2"]);</para><para>//Check mergable Area</para><para>Console.Write(mergableRange.RangeAddressLocal);</para><para>//Save to file</para><para>workbook.SaveToFile("Intersect.xlsx");</para>
Public method Merge(IXLSRange)
Creates a merged cell from the specified Range object.
(Inherited from XlsRange .)
Public method Move(CellRange)
Moves the cells to the specified Range.
Public method Move(CellRange, Boolean, Boolean)
Moves the range to the specified destination range with options for copying styles and updating references.
Protected method MoveTo(IXLSRange)
Moves the range to the specified destination with the default copy options.
(Inherited from XlsRange .)
Protected method MoveTo(IXLSRange, Boolean)
Moves the range to the specified destination.
(Inherited from XlsRange .)
Protected method OnDispose
Method which can be overriden by users to take any specific actions when object is disposed.
(Inherited from XlsObject .)
Public method PartialClear
Partially clear range.
(Inherited from XlsRange .)
Protected method ReleaseReference
Decrease quantity of Reference. User must call this method when freeing resources.
(Inherited from XlsObject .)
Public method RemoveCellImage
Remove CellImage.
(Inherited from XlsRange .)
Public method RemoveCombinedRange
Removes a combined range from the list of combined ranges and refreshes the combined cells.
(Inherited from XlsRange .)
Public method RemoveMergeComment
Removes merge comments from a cell range.
(Inherited from XlsRange .)
Public method ReparseFormulaString
Reparses formula.
(Inherited from XlsRange .)
Public method Replace(String, DateTime)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, Double)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, String)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, DataColumn, Boolean)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, DataTable, Boolean)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, Double , Boolean)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, Int32 , Boolean)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method Replace(String, String , Boolean)
Replaces cells' values with new data.
(Inherited from XlsRange .)
Public method SetAutoFormat(AutoFormatType) Obsolete.
Sets auto format for current range.
(Inherited from XlsRange .)
Public method SetAutoFormat(AutoFormatType, AutoFormatOptions) Obsolete.
Sets auto format for current range.
(Inherited from XlsRange .)
Protected method SetBorderToSingleCell
Sets the border for a single cell.
(Inherited from XlsRange .)
Public method SetDataValidation(Validation)
Sets data validation for the range.
Public method SetDataValidation(XlsValidation)
Sets data validation for the range.
(Inherited from XlsRange .)
Public method SetExtendedFormatIndex
Sets index of extended format that defines style for this range..
(Inherited from XlsRange .)
Protected method SetParent
Sets parent of the object.
(Inherited from XlsObject .)
Public method SetRowHeight
Sets row height.
(Inherited from XlsRange .)
Public method SetSharedFormula
Sets the shared formula for a cell or a range of cells.
(Inherited from XlsRange .)
Public method TextPartReplace
Replaces cell's part text and reserve text's format.
(Inherited from XlsRange .)
Public method ToString
Returns a string that represents the current object.
(Inherited from Object .)
Public method UngroupByColumns
Ungroups column.
(Inherited from XlsRange .)
Public method UngroupByRows
Ungroups row.
(Inherited from XlsRange .)
Public method Union
Combines the current range with another cell range.
(Inherited from XlsRange .)
Public method Code example UnMerge
Separates a merged area into individual cells.
Examples
The following code illustrates how to UnMerge the merged cells:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Set text</para><para>worksheet["A1"].Text = "Merged cell";</para><para>//Merge cells</para><para>worksheet["A1:B1"].Merge(true);</para><para>//Unmerge cells</para><para>worksheet["A1:B1"].UnMerge();</para><para>//Save to file</para><para>workbook.SaveToFile("UnMerge.xlsx");</para>
(Inherited from XlsRange .)
Public method UpdateRange
Update region of range
(Inherited from XlsRange .)
Top
See Also