AutoFill range of Excel file

Perform an autofill in the specified range in Excel

In Excel, Select a range, Move mouse to right-bottom, drag “+” to autofill data .

Auto Fill Ranges with Aspose.Cells for Python Excel Library

The following example shows how to do AutoFill operation to the Range, and here is the sample file which can be downloaded for testing this feature:

range_autofill.xlsx

from aspose.cells import AutoFillType, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# Create a Workbook
workbook = Workbook("range_autofill.xlsx")
# Get Cells
cells = workbook.worksheets[0].cells
# Create Range
src = cells.create_range("C3:C4")
dest = cells.create_range("C5:C10")
# AutoFill
src.auto_fill(dest, AutoFillType.SERIES)
# Save the Workbook
workbook.save("range_autofill_result.xlsx")