Intervallo di riempimento automatico del file Excel

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:

range_autofill.xlsx

// 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");