复制工作表
Contents
[
Hide
]
Aspose.Cells - 复制工作表
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 - 复制工作表
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();
下载运行代码
下载复制工作表形成以下任何一个社交编码网站:
欲了解更多详情,请访问使用工作表.