Excel ファイルの AutoFill 範囲
Contents
[
Hide
]
指定した範囲で Excel で自動入力を実行します
Excel では、範囲を選択し、マウスを右下に移動し、「+」をドラッグしてデータを自動入力することができます。
Aspose.Cells で範囲を自動入力する
次の例は、Range に AutoFill 操作を行う方法を示しており、この機能をテストするためにダウンロードできるサンプルファイルがこちらにあります:
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Create a Workbook | |
Aspose.Cells.Workbook workbook = new Workbook("range_autofill.xlsx"); | |
//Get Cells | |
Aspose.Cells.Cells cells = workbook.Worksheets[0].Cells; | |
//Create Range | |
Aspose.Cells.Range src = cells.CreateRange("C3:C4"); | |
Aspose.Cells.Range dest = cells.CreateRange("C5:C10"); | |
//AutoFill | |
src.AutoFill(dest, AutoFillType.Series); | |
//Save the Workbook | |
workbook.Save("range_autofill_result.xlsx"); |