Putting a chart on a new chart worksheet


#1

Is it possible to dynamically add a chart to a new chart worksheet like you can when you create charts manually in excel?

I have a chart working on the same sheet like in the demo

Cheers


#2

Yes, you can create a new sheet and add chart in this sheet.

For example,

Excel excel = new Excel();
excel.Worksheets.Add();

Cells cells = excel.Worksheets[0].Cells;
Worksheet sheet = excel.Worksheets[0];

cells[“A1”].PutValue(100);
cells[“A2”].PutValue(200);
cells[“A3”].PutValue(300);
cells[“A4”].PutValue(“A”);

cells[“b1”].PutValue(400);
cells[“b2”].PutValue(500);
cells[“b3”].PutValue(600);
cells[“b4”].PutValue(“B”);

sheet = excel.Worksheets[1];
int chartIndex = sheet.Charts.Add(ChartType.ColumnStacked, 5, 5, 20, 10);
Chart chart = sheet.Charts[chartIndex];
chart.NSeries.Add(“Sheet1!A1:B3”, true);


#3

Hi Laurence

Thanks for the example, it worked well but wasnt quite what I meant.

In excel you can create a chart on a new ‘chart’ type of worksheet. Where no cells are visible and the chart is full screen. Is it possible to create this type of sheet?

Thanks,
Joe


#4

Hi Joe,

I understand your need now. Could you tell me your expected date for this feature? I will put it in my future work plan.

Now can you use my method as a work around.


#5

Laurence,

There is no immediate urgency for the feature. At the moment I am just evaluating a few of your products before we decide to purchase. It looks like we may do so in the near future and this would be a useful feature to us, but it is not vital.

Thanks,
Joe


#6

Hi Joe,

Thanks for your interest on Aspose.Excel. I will work on this feature in a few days. If this feature is important to evaluate Aspose, please let me know.

Anyway, your feature request is a good advice to Aspose.Excel. It will be included in our product.