We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Having problems using charts PlotVisibleCells flag

Hi Aspose Team,

I set chart.PlotVisibleCells to false and it is saved as but if I create a group data is not visible in the chart.

If I modify same file with Excel the xml tag disappears.

Seems like Chart.PlotVisibleCells flag does not have any effect in Excel. Is this a bug?

Regards

Ranko

Hi,

Thank you for considering Aspose.

Well, we are not very clear about your issue. Please try the attached latest version of Aspose.Cells and check if it works fine for you. If you still face any problem, please share your template file, generated file and sample code to reproduce the issue and we will check it soon.

Thank You & Best Regards,

Hi Nausherwan

find code bellow. I am using Aspose.Cells 4.8.0.0... Also tried with 4.8.0.15 but same result

Regards

Ranko

Workbook wb = new Workbook();

wb.Worksheets.Clear();

Worksheet ws = wb.Worksheets[wb.Worksheets.Add()];

ws.Name = "Sheet";

Cells cells = ws.Cells;

cells[0, 1].PutValue("Person");

cells[0, 1].Style.Font.IsBold = true;

cells[1, 1].PutValue("Alice");

cells[2, 1].PutValue("Bob");

cells[3, 1].PutValue("Eve");

cells[4, 1].PutValue("Jenny");

cells[0, 2].PutValue("Values");

cells[0, 2].Style.Font.IsBold = true;

cells[1, 2].PutValue(88.0);

cells[2, 2].PutValue(34.2);

cells[3, 2].PutValue(34.5);

cells[4, 2].PutValue(52.0);

cells.GroupRows(0, 5, true);

Chart chart = ws.Charts[ws.Charts.Add(ChartType.Column, 15, 1, 30, 8)];

chart.Title.Text = "Chart Title";

chart.Legend.Position = LegendPositionType.Bottom;

chart.ValueAxis.Title.Text = "Values";

chart.PlotVisibleCells = false;

chart.Placement = PlacementType.FreeFloating;

ASeries s1 = chart.NSeries[chart.NSeries.Add(String.Format("{0}!{1}", ws.Name, "C1"), true)];

s1.Values = String.Format("{0}!{1}{2}:{1}{3}", ws.Name, "C", 2, 5);

s1.Name = ws.Cells["C1"].Value.ToString();

chart.NSeries.CategoryData = String.Format("{0}!{1}{2}:{1}{3}", ws.Name, "C", 2, 5);

wb.Save(@"HiddenChartData.xlsx", FileFormatType.Excel2007Xlsx);

Hi,

Thanks for providing us sample code.

Well, the Boolean property Chart.PlotVisibleCells works if you are saving the chart in XLS (MS Excel 97-20003) format.

Thank you.

Hi,

what to do to make it work in Excel 2007?

Regards

Ranko

Hi Ranko,

Well, I am afraid, currently the feature is only supported in xls file format (MS Excel 97 - 2003). We will support it for xlsx file format(MS Excel 2007).

Your feature request has been logged into our issue tracking system with an issue id: CELLSNET-11609.

Thank you.

Hi,

Please try the attached fix, we have supported PlotVisibleCells flag in xlsx files.

Thank you.

Hi Amjad

Yes it is working!!

Thanks to you and the Aspose team on the fast respond.

Regards

Ranko

The issues you have found earlier (filed as 11609) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.