Free Support Forum - aspose.com

Changing Series-Caption from ChartEx in a Template-PPTX makes it impossible to edit Chartdata in Excel

Hi Forum,

with Slides 5.2.0.0 & Cells 5.3.3.0, i load a PPTX-Template and want to edit the included (not embedded!) Chart. This works fine so far, but after changing the caption of the series (column-headers of the included data-table), i can´t edit the chart-data in excel anymore.

Normally, we open a PPTX with Powerpoint, right-click the Chart and select "edit data" (<- don´t know if this is true for english versions of Powerpoint - the menu-entry of my german version for this is "Daten bearbeiten..") and Excel starts up. But when doing this with my generated PPTX, nothing happens!

I think that our customers will miss this functionality of the created PPTX, but - more important - i fear that this problem is caused by a corrupted PPTX-File and we can get other problems in the future.

I made some investagations and found out :
- The problems occurs when:
- I write to a cell that is part of a chart-series (in my Template : Row 0, Column 1-4).
- I use a new Template. (Start PowerPoint, Select Insert/Chart, Save as "template.pptx")

- The problem does not occur when:
- I write "outside" the chart-series (in my Template : Row 0, Column > 4)
- I write to the category-captions (in my Template : Row 1-4, Column 0)

--

To reproduce the behaviour, i attached my PPTX-Template and made a little C# test-app. To "acivate" the problem, un-comment the first "cell.PutValue()".

using Aspose.Cells;
using Aspose.Slides;
using Aspose.Slides.Pptx;
using Aspose.Slides.Pptx.Charts;

PresentationEx
pres = new PresentationEx("template.pptx");

foreach (ShapeEx shape in pres.Slides[0].Shapes)
if (shape is ChartEx)
{
ChartEx
ch = (ChartEx)shape;
ChartDataEx
chd = ch.ChartData;
Workbook
wb = (Workbook)chd.Workbook;
Worksheet
ws = wb.Worksheets[0];

// write captions to the categories (rows)..

// this produces the problem..
//ws.Cells[0, 1].PutValue("Test (0/1)");

// this works..
ws.Cells[0, 4].PutValue("Test (0/4)");

// write captions to the series (columns)..

// this works..
ws.Cells[4, 0].PutValue("Test (4/0)");
ws.Cells[5, 0].PutValue("Test (5/0)");
}
}

pres.Save("outfile.pptx", Aspose.Slides.Export.SaveFormat.Pptx);

--

Thank you for any tip! :)

Dirk

Hi Dirk,

I have comprehensively investigated the issue shared by you and have observed that issue arise whenever any of series title is modified. An issue with ID 28213 has been created in our issue tracking system to further investigate and resolve the issue. In fact the issue has been scheduled for initial investigation during 26th Week of 2011. We will share the further repose with you on the basis of that.

Thanks and Regards,

Hi Mudassir,

are there any news for that issue? Meanwhile, we updated to Aspose.Slides 5.3.0.0 but we still have the same problem!

Regards,
Dirk

Hi Dirk,

Our development team has worked on the issue shared by you and it seems it is in fact not an issue. The approach that has been adopted is actually responsible for corrupted chart data sheet. In this case you are working not just with a Cell object but are trying to change a property "Name" of listObjects.ListColumn. If change a Cell like just a Cell - excel file will be corrupted. I have shared the updated project code as well. For reference, please visit this documentation link. Please use this code in this case:

Aspose.Cells.Tables.ListObjectCollection listObjects = wb.Worksheets[0].ListObjects;
listObjects[0].ListColumns[1].Name = "Test (0/1)";

Thanks and Regards,

Hi Mudassir,

thank you for your quick answer, but i don´t have a clue how can realize your solution with Aspose.Slides !

I can find a reference to a Worksheet (ChartDataWorksheet), but there aren´t properties to ListObjects.

Also, i searched the (Slides!)Helpfile for the Word "ListObjects" - nothing to find.

Is there a way to get a "connection" to Aspose.Cells so i can use that ListObjects?

Please remember: We´re not talking about functionality for OLE-Objects!

Regards,
Dirk

Hi Dirk,

I like to share that you have earlier shared the issue while using Aspose.Slides for .NET 5.2.0 which is directly dependent on Aspose.Cells for charts rendering and the solution that I have shared with you is workable till Aspose.Slides for .NET 5.2.0. In Aspose.Slides for .NET 5.3.0, the dependence on Aspose.Cells has been removed and you can use the code snippet shared here to change the modify the chart series names. Aspose.Slides for .NET 5.3.0 does change the series name, however, the chart data becomes unaccessible in PowerPoint. I have shared the issue with our development team and will share the information with you once the issue is resolved.

Thanks and Regards,

Hi Mudassir,

i hope that we can get a solution very soon as we can´t fully deliver our product to our customer before this issue is solved!

Regards,
Dirk

Hi Mudassir,



I’m develop lead for this product (and Dirks manager).



Our customer is very unsatisfied with the state of your Library and thinks about dropping the project.



This bug prevents us from moving on.



Till this monday (2011-08-08) our customer needs a reliable date (or at least a timeframe) when thouse issues are fixed.



greetings



Sven

Hi Sven,

I am really sorry for your inconvenience.

I have discussed the issue with our development team and they are working on the issue. Acrually, the chart rendering involves Aspose.Cells internally in Aspose.Slides. The issue seem to be in Aspose.Cells for this and we are expecting response from them hopefully by coming weekend. We will then be surely helping you with a quick hotfix to mitigate this issue. We will really appreciate your cooperation in this regard.

Thanks and Regards,

Hi Mudassir,



thanks for your reply.



This mean that we have good reasons to expect a working version in the midst of August, right?



greetings



Sven Passig

Hi Sven Passing,

Yes, we are hopeful to provide the fix for the issue by next week end. But, it is highly dependent on the availability of related Aspose.Cells issue which is expected to be fixed by this weekend.

Thanks and Regards,

Hi Sven Passig,

I like to share that the mentioned issue of modifying chart series making it impossible to edit chart data in excel has been resolved in Aspose.Slides for .NET 5.4.1. I have shared the the .NET 2.0 dll here in this post. The hotfix will also be shared in download section by weekend hopefully as well.

Thanks and Regards,

Hi Mudassir,


this is great news indeed!

all the best

Sven

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan