Copier la feuille de calcul

Aspose.Cells - Copier la feuille de travail

C#

 //Create a new Workbook by excel file path

Workbook wb = new Workbook("../../data/workbook.xlsx");

//Create a Worksheets object with reference to the sheets of the Workbook.

WorksheetCollection sheets = wb.Worksheets;

//Copy data to a new sheet from an existing sheet within the Workbook.

sheets.AddCopy("Sheet1");

wb.Save("../../data/workbook.xlsx");

NPOI - HSSF XSSF - Feuille de travail de copie

C#

 IWorkbook wb = new XSSFWorkbook();

wb.CreateSheet("new sheet");

wb.CreateSheet("second sheet");

ISheet cloneSheet = wb.CloneSheet(0);

FileStream sw = File.Create("newWorksheet.xls");

wb.Write(sw);

sw.Close();

Télécharger le code d’exécution

TéléchargerCopier la feuille de calcul forment l’un des sites de codage social mentionnés ci-dessous :