Intervallo di riempimento automatico del file Excel
Contents
[
Hide
]
Eseguire un riempimento automatico nell’intervallo specificato in Excel
In Excel, selezionare un intervallo, spostare il mouse in basso a destra, trascinare “+” per compilare automaticamente i dati.
Intervalli di riempimento automatico con Aspose.Cells
L’esempio seguente mostra come eseguire l’operazione di riempimento automatico nell’intervallo, ed ecco il file di esempio che può essere scaricato per testare questa funzione:
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
//Create a Workbook | |
Workbook workbook = new Workbook("range_autofill.xlsx"); | |
//Get Cells | |
Cells cells = workbook.getWorksheets().get(0).getCells(); | |
//Create Range | |
Range src = cells.createRange("C3:C4"); | |
Range dest = cells.createRange("C5:C10"); | |
//AutoFill | |
src.autoFill(dest, AutoFillType.SERIES); | |
//Save the Workbook | |
workbook.save("range_autofill_result.xlsx"); |