//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); // Load template file FlowChartsFile.xlsx from resource var fileStream = this.GetResourceStream("xlsx\\FlowChartsFile.xlsx"); workbook.Open(fileStream); // Move the selected sheets to the end of current workbook workbook.Worksheets[new string[] { "FlowChart1", "FlowChart2" }].Move(); // Save to an excel file workbook.Save("MoveMultipleWorksheets.xlsx");
' Create a new Workbook Dim workbook As New Workbook ' Load template file FlowChartsFile.xlsx from resource Dim fileStream = GetResourceStream("xlsx\FlowChartsFile.xlsx") workbook.Open(fileStream) ' Move the selected sheets to the end of current workbook workbook.Worksheets(New String() {"FlowChart1", "FlowChart2"}).Move() ' save to an excel file workbook.Save("MoveMultipleWorksheets.xlsx")