Specification of an item axis label


#1

How should the place set to

ActiveChart.SeriesCollection(1).XValues = "=template!R5C2:R7C13"

by EXCEL VBA be specified by Aspose.Excel?


#2

You can try this:

chart.NSeries.CategoryData = “=template!R5C2:R7C13”


#3

Dear Sir or Laurence:
Thank you for a reply.Smile

Question 1

Dim excel As Excel = New Excel
excel.Open("c:\chart.xls")
excel.Worksheets(1).Charts(0).NSeries.CategoryData = "Sheet1!$A$5EmbarrassedI$5"
excel.Save("c:\chart1.xls", FileFormatType.Default)

A setup was not reflected.

Question 2

Dim excel As Excel = New Excel
excel.Open("c:\chart.xls")
console.writeline("excel.Worksheets(1).Charts(0).NSeries.CategoryData")

The result was Nothing. Is it unacquirable?


#4

Hi,

Chart APIs are used to create chart at run time. It doesn't change setting at the designer spreadsheet.


Excel excel = new Excel();
Cells cells = excel.Worksheets[0].Cells;

cells["A1"].PutValue(100);
cells["A2"].PutValue(200);
cells["A3"].PutValue(300);

cells["b1"].PutValue(400);
cells["b2"].PutValue(500);
cells["b3"].PutValue(600);

cells["C1"].PutValue(500);
cells["C2"].PutValue(600);
cells["C3"].PutValue(700);

int chartIndex = sheet.Charts.Add(ChartType.Column, 5, 5, 20, 10);
Chart chart = sheet.Charts[chartIndex];
chart.NSeries.Add("A1:B3", true);

chart.NSeries.CategoryData = "C1:C3";


#5

Dear Sir or Laurence:
Can’t it do too? It understood.
Thank you.