复制工作表
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();
下载运行代码
从以下任意社交编码网站下载复制工作表。
有关更多详细信息,请访问使用工作表。