Copy Sparkline by Specifying Data Range and Location of Sparkline Group
Contents
[
Hide
]
Microsoft Excel allows you to copy a sparkline by specifying the data range and location of a sparkline group. Aspose.Cells supports this feature.
To copy a sparkline to other cells in Microsoft Excel:
- Select the cell containing the sparkline.
- Select Edit Data from the Sparkline section of the Design tab.
- Select Edit Group Location & Data.
- Specify the data range and location.
- Click OK.
Aspose.Cells provides the SparklineCollection.Add(dataRange, row, column) method to specify a sparkline group’s data range and location. 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 in the sparkline group. Finally, it writes the output Excel file on disk which is also shown in the screenshot above.