Copy Range Data with Style
Contents
[
Hide
]
Copy Range Data Only explained how to copy the data from a range of cells to another range. Specifically, it process applied a new set of styles to the copied cells. Aspose.Cells for Python via .NET can also copy a range complete with formatting. This article explains how.
Aspose.Cells for Python via .NET provides a range of classes and methods for working with ranges, for example, create_range(upper_left_cell, lower_right_cell), StyleFlag and apply_style(style, flag).
This example:
- Creates a workbook.
- Fills a number of cells in the first worksheet with data.
- Creates a Range.
- Creates a Style object with specified formatting attributes.
- Applies the style to the data range.
- Creates a second range of cells.
- Copies data with the formatting from the first range to the second range.