Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Sometimes you need to copy different pictures, charts, and other drawing objects to different worksheets as per your requirement. Aspose.Cells supports copying shapes between worksheets. The charts, images, and other objects are copied with the highest degree of precision.
You might try Office Automation, but that has its own drawbacks. There are several reasons and issues involved: for example, security, stability, scalability, speed, price, and features. In short, there are many reasons, with the top one being that Microsoft strongly recommends against Office automation from software solutions.
In this article, we create a console application and perform the copying of pictures, charts, and other drawing objects between worksheets of a workbook with a few simple lines of code using Aspose.Cells.
This document is designed to provide developers with a detailed understanding of how to copy shapes (pictures, charts, controls, and other drawing objects) between worksheets.
This article explains how to:
Create a new workbook in Microsoft Excel.
Add a picture on the first worksheet and a chart on the second worksheet.
The following screenshots show the two template worksheets created in Microsoft Excel.
Worksheet “Chart” with chart

Worksheet “Picture” with picture

Now copy the picture in the worksheet named “Picture” to the last worksheet “Result”.
Unzip it on your development computer.
All Aspose components, when installed, work in evaluation mode. The evaluation mode has no time limit and it only injects watermarks into produced documents.
You can either create a project using a Java IDE, such as Eclipse, or create a simple program using Notepad.
To set the class path using Eclipse, please perform the following steps:
Or you may set it at runtime from the Windows command prompt. For example:
javac -classpath %classpath%;e:\Aspose.Cells.jar; ClassName.java
java -classpath %classpath%;e:\Aspose.Cells.jar; ClassName
The following code accomplishes the task. It copies a picture from the worksheet named “Picture” to the worksheet “Result”.
After executing the above code, the picture from worksheet “Picture” is now copied to the last worksheet “Result”.
Worksheet “Result” with copied picture

The following is the actual code used by the component to accomplish the task.
After executing the above code, the chart from worksheet “Chart” is copied to the worksheet “Result”. Please see the following snapshot of the resultant worksheet.
Worksheet “Result” with copied picture and chart

Worksheet “Control” with textbox and oval

Please see the following simple steps you need to perform to get your desired results.
The following is the code used by the component to accomplish the task.
After executing the above code, the controls from the worksheet “Control” are now copied to worksheet “Result”. Please see the following snapshot of “Result”.
Worksheet “Result” with copied textbox and oval

This article has shown how to copy different shapes like pictures, charts, and other drawing objects between worksheets using Aspose.Cells. Hopefully, it will give you some insight, and you will be able to utilize these options according to your various scenarios.
Aspose.Cells can offer more flexibility than other solutions and provides outstanding speed, efficiency, and reliability to meet specific business application requirements. The results demonstrate that Aspose.Cells has benefited from years of research, design, and careful tuning.
We warmly welcome your queries, comments, and suggestions in the Aspose.Cells Forum.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.