Thanks for your posting and using Aspose.Cells.
After initial investigation, we were able to observe this issue. PlotOnSecondAxis is not working properly. However, we need your runnable sample console application project replicating this issue with the latest version: Aspose.Cells
for .NET v220.127.116.11 so that we could run it at our end and log this issue for a fix.
Thanks for your cooperation.
Thanks for your sample project and using Aspose.Cells.
We were able to replicate this issue with your sample project using the latest version. We have therefore logged this issue in our database for investigation.
We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.
This issue has been logged as
- CELLSNET-43311 - Unable to plot series on the secondary axis
Thanks for using Aspose.Cells.
We have fixed your code and attached the fixed project for you which generates correct output Excel file as desired by you.
We have made changes in these lines. Changes are highlighted in red color. I have also attached the output Excel file generated by the fixed project for your reference
oPvtXL.DataBodyRange.StartColumn) & “:” & Aspose.Cells.CellsHelper.CellIndexToName(oPvtXL.DataBodyRange.EndRow, oPvtXL.DataBodyRange.EndColumn - 1)
Dim s As Aspose.Cells.Charts.Series = oChartXL.NSeries(1)
s.PlotOnSecondAxis = True
Thanks for your feedback and using Aspose.Cells.
Yes, you are right. This was the main line that fixes your issue. Let us know if you encounter any other issue, we will be glad to look into it and help you further.