Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Copy Sparkline by Specifying Data Range and Location of Sparkline Group in MS Excel
Microsoft Excel allows you to copy a Sparkline by specifying the Data Range and Location of Sparkline Group. Follow these steps to copy your Sparkline to other cells.
Aspose.Cells provides the SparklineCollection.add(dataRange, row, column) method to specify the Data Range and Location of Sparkline Group.
The following screenshot shows the source Excel file used inside the code. The red highlighted area shows “Edit Group Location & Data…” option to specify the data range and location of the sparkline group. The cell P4 shows the sparkline which will be copied to the other four cells filled with yellow color using Aspose.Cells.

The following screenshot shows the output Excel file generated by the sample code. As you can see, the sparkline in cell P4 has been copied to the next four cells in column P each with different data range.

The following sample code loads the source Excel file as shown in the screenshot above, then accesses the first sparkline group and adds data ranges and locations inside the sparkline group. Finally, it writes the output Excel file on disk which is also shown in the screenshot above.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.