ワークシート内のセルの範囲を移動する
Contents
[
Hide
]
この記事では、ワークシート内のセルの範囲を移動する方法を示しています。
ワークシート内のセルの範囲を移動する方法
例のコードは、タスクをデモンストレーションするためにテンプレートファイルを使用しています。
入力ファイル
次に、範囲A1:B5をC1:D5に移動した生成されたファイルをご覧ください。
出力ファイル
サンプルコード
This file contains 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) |