Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In Excel, you can select multiple cells with a mouse‑box selection; the set of selected cells is called a Range.
For example, you can click the left mouse button in cell A1 of the worksheet and then drag to cell C4. The rectangular area you selected can also be easily created as an object by using Aspose.Cells for Python via .NET.
Here is how to create a range, put values, set style, and perform more operations on the Range object.
Aspose.Cells for Python via .NET provides a class, Workbook, that represents a Microsoft Excel file. The Workbook class contains a Worksheets collection that allows access to each worksheet in an Excel file. A worksheet is represented by the Worksheet class. The Worksheet class provides a Cells collection.
When you want to create a rectangular area that extends over A1:C4, you can use the following code:
Say you have a range of cells that extends over A1:C4. The matrix has 4 × 3 = 12 cells. The individual range cells are arranged sequentially.
The following example shows how to input some values into the cells of the Range.
The following example shows how to set the style of the cells of the Range.
CurrentRegion is a property that returns a Range object that represents the current region.
The current region is a range bounded by any combination of blank rows and blank columns. It is read‑only.
In Excel, you can obtain the CurrentRegion area by:
Using Aspose.Cells for Python via .NET, you can use the Range.current_region property to perform the same function.
Please download the following test file, open it in Excel, use the mouse box to select an area A1:D7, then press Ctrl+Shift+*; you will see area A1:C3 selected.
Now please run the following example to see how it works in Aspose.Cells for Python via .NET:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.