移动工作表中的单元格范围
Contents
[
Hide
]
本文介绍了如何移动工作表中的单元格范围。
如何在工作表中移动单元格范围
示例代码使用模板文件演示了该任务。
输入文件
请参阅以下生成的文件,范围 A1:B5 移动到 C1:D5。
输出文件
示例代码
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aspose.cells import Workbook | |
# Instantiate the workbook object. Open the Excel file | |
workbook = Workbook("book1.xlsx") | |
cells = workbook.worksheets[0].cells | |
range = cells.create_range("A1", "B5") | |
# move the range to right. | |
range.move_to(0, 2) |