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 entry. 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 three times.
Aspose.Cells supports copying or moving worksheets within or between workbooks. Worksheets including data, formatting, tables, matrices, charts, images and other objects are copied with the highest degree of precision.
This article explains how to use Aspose.Cells to:
The initial steps are the same for all examples.
FirstWorkbook.xls (3 worksheets)
SecondWorkbook.xls (1 worksheet).
FirstWorkbook.xls

SecondWorkbook.xls

Or you can set the classpath at runtime in a DOS prompt on Windows.
For example:
javac -classpath %classpath%;e:\Aspose.Cells.jar; ClassName.java
java -classpath %classpath%;e:\Aspose.Cells.jar; ClassNameCopy worksheet within a workbook:
Below is the code used to accomplish the task. It copies the worksheet Copy within FirstWorkbook.xls.
Executing the code renames the worksheet named Copy to Last Sheet.
Output file

Below is the code used to accomplish the task.
Executing the code moves the worksheet Move from index 1 to index 2 in FirstWorkbook.xls.
Output file

Executing the code copies the worksheet Copy to SecondWorkbook.xls with the new name Sheet2.
Output file

Executing the code moves the worksheet from FirstWorkbook.xls to SecondWorkbook.xls with the new name Sheet3.
Output FirstWorkbook.xls

Output SecondWorkbook.xls

This article explains how to copy and move worksheets within and between workbooks using Aspose.Cells.
Aspose.Cells has benefited from years of research, design and careful tuning. We welcome your queries, comments and suggestions at the Aspose.Cells Forum. We warrant a prompt reply.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.