I have a workbook with 2 worksheets. I would like the first worksheet to display the data, and the second worksheet to display a chart using data from worksheet 1.
The online documentation recommends
Worksheet worksheet = workbook.Worksheets[0];
int chartIndex = worksheet.Charts.Add(ChartType.Bar, 10, 0,30 , 10);
Chart chart = worksheet.Charts[chartIndex];
chart.NSeries.Add("B2:C5", true);
But the chart.NSeries object defaults to the same worksheet the chart is on. Is it possible to point the chart.NSeries to a different worksheet? Or do I have to copy the values of worksheet 1 to worksheet 2?
That solved it. Just one more quick question, in Excel, by right clicking on a chart and choosing location, a chart can be added to the current worksheet or as a new sheet, in which case it occupies the whole of the sheet. Is add chart as 'new sheet' functionality included in Aspose Cells?