Range.AutoFill
Contents
[
Hide
]AutoFill(Range)
Automaticall fill the target range.
public void AutoFill(Range target)
Parameter | Type | Description |
---|---|---|
target | Range | the target range. |
Examples
[C#]
//Instantiating a Workbook object
Workbook workbook = new Workbook();
// Get the first Worksheet Cells.
Cells cells = workbook.Worksheets[0].Cells;
cells["A1"].PutValue(1);
cells["A2"].PutValue(2);
Aspose.Cells.Range source = cells.CreateRange("A1:A2");
Aspose.Cells.Range target = cells.CreateRange("A3:A10");
//fill 3,4,5....10 to the range A3:A10
source.AutoFill(target);
//Save the Excel file
workbook.Save("book1.xlsm");
[Visual Basic]
'Instantiating a Workbook object
Dim workbook As Workbook = New Workbook("Book1.xlsx")
// Get the first Worksheet Cells.
Dim cells as Cells = workbook.Worksheets[0].Cells
cells("A1").PutValue(1)
cells("A2").PutValue(2)
Dim source as Aspose.Cells.Range = cells.CreateRange("A1:A2")
Dim target as Aspose.Cells.Range = cells.CreateRange("A3:A10")
'fill 3,4,5....10 to the range A3:A10
source.AutoFill(target)
'Save the Excel file
workbook.Save("book1.xlsm")
See Also
- class Range
- namespace Aspose.Cells
- assembly Aspose.Cells
AutoFill(Range, AutoFillType)
Automaticall fill the target range.
public void AutoFill(Range target, AutoFillType autoFillType)
Parameter | Type | Description |
---|---|---|
target | Range | The targed range. |
autoFillType | AutoFillType | The auto fill type. |
See Also
- enum AutoFillType
- class Range
- namespace Aspose.Cells
- assembly Aspose.Cells