Get Worksheet of the Chart with Golang via C++
Contents
[
Hide
]
Sometimes, you want to access a worksheet from a chart’s reference. Aspose.Cells provides the Chart::GetWorksheet method which returns the reference of the worksheet that contains the chart.
The following example shows how to use the Chart::GetWorksheet method. The code first prints the name of the worksheet, then accesses the first chart on the worksheet. It then prints the worksheet name again, using the Chart::GetWorksheet method.
Below is the console output that the sample code results in. As you can see, it prints the same worksheet name both times.
Sheet Name: Portfolio
Chart's Sheet Name: Portfolio