//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); //Load template file AgingReport.xlsx from resource var fileStream = this.GetResourceStream("xlsx\\AgingReport.xlsx"); workbook.Open(fileStream); //Move the active sheet to the end of current workbook var move_worksheet = workbook.ActiveSheet.Move(); move_worksheet.Name = "Move of " + workbook.ActiveSheet.Name; // Save to an excel file workbook.Save("MoveWorksheet.xlsx");
' Create a new Workbook Dim workbook As New Workbook 'Load template file AgingReport.xlsx from resource Dim fileStream = GetResourceStream("AgingReport.xlsx") workbook.Open(fileStream) 'Move the active sheet to the end of current workbook Dim move_worksheet = workbook.ActiveSheet.Move() move_worksheet.Name = "Move of " & workbook.ActiveSheet.Name ' save to an excel file workbook.Save("MoveWorksheet.xlsx")