Creates a copy of this sheet.
'Declaration
Public Function Clone() As XLSheet
Return Value
A new
XLSheet object with the same contents and formatting as this sheet.
The code below loads a book that contains a template sheet, creates 12 copies of that sheet, removes the template sheet, then saves the file with a new name.
// load book with template sheet
_c1xl.Load(@"c:\temp\template.xls");
// create 12 copies of the template sheet
XLSheet templateSheet = _c1xl.Sheets["Template"];
for (int month = 1; month <= 12; month++)
{
XLSheet newSheet = templateSheet.Clone();
newSheet.Name = month.ToString(); // rename clone
newSheet[0,0].Value = month; // make changes
_c1xl.Sheets.Add(newSheet); // add clone to book
}
// remove the template sheet and save with new name
_c1xl.Sheets.Remove("Template");
_c1xl.Save(@"C:\temp\expense_report.xls");