[]
Copies the sheet to the end of the specified workbook.
The copied sheet is appended to the destination workbook and returned as a new worksheet instance. If null is specified, the sheet is copied to the end of the current workbook.
IWorksheet Copy(IWorkbook workbook = null)
Function Copy(Optional workbook As IWorkbook = Nothing) As IWorksheet
| Type | Name | Description |
|---|---|---|
| IWorkbook | workbook | The workbook to which the sheet will be copied, or |
| Type | Description |
|---|---|
| IWorksheet | The newly copied worksheet. |
worksheet.Name = "Report";
worksheet.Range["A1:B2"].Value = new object[,] {
{"Name", "Value"},
{"Test", 100}
};
IWorkbook targetWorkbook = new Workbook();
IWorksheet copiedSheet = worksheet.Copy(targetWorkbook);
copiedSheet.Name = "Report Copy";