Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Sometimes, you do need a number of worksheets with common formatting and data. For example, if you work with quarterly budgets, you might want to create a workbook with sheets that contain the same column headings, row headings, and formulas. There is a way to do this: by creating one sheet and then copying it.
Aspose.Cells supports copying and moving worksheets within or between workbooks. Worksheets, complete with data, formatting, tables, matrices, charts, images, and other objects, are copied with the highest degree of precision.
The following are the steps involved in copying and moving worksheets within or between workbooks.
Aspose.Cells provides an overloaded WorksheetCollection.addCopy() method that is used to copy an existing worksheet. One version of the method takes the index of the source worksheet as a parameter. The other version takes the name of the source worksheet.
The following example shows how to copy an existing worksheet within a workbook.
Aspose.Cells provides the Worksheet.copy() method used to copy worksheets to other workbooks. The method takes the source worksheet object as a parameter.
The following example shows how to copy a worksheet from one workbook to another workbook.
Aspose.Cells provides the Worksheet.moveTo() method used to move a worksheet to another location in the same spreadsheet.
The following example shows how to move a worksheet to another location within the workbook.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.