Free Support Forum - aspose.com

How to modify Excel chart's object data in PPT file

Hi,

From my dotnet web application Iam trying to access a PPT file.

That PPT file's slide has an embeded Excel chart, I want to modify that Excel chart's data at runtime, so that my Excel chart will be get effected with the modified values.

I am using ASPOSE.Slides and ASPOSE.Cells in my application.

A quick response will be greatly apreciated

Thanks,

Jyothi

Dear Jyothi,

Previously, I mistakenly provided you incorrect link to the project which is basically a console based application that reads an existing chart from the existing ppt and updates its data by using Aspose.Cells and Aspose.Slides. It will give you an idea how to make use of Aspose.Cells and Aspose.Slides to get what you need.

Here is the correct link to the project

https://forum.aspose.com/t/102913

And here is the link to the thread where this project is attached

http://www.aspose.com/Community/forums/72379/ShowThread.aspx#72379

Hi,

again u provided me a Console application, anyway I was trying to get executed that code, but Iam getting an exception called "Argument Null Exception" when executing this "MemoryStream msIn = new MemoryStream(oof.ObjectData);" line by saying "Buffer cannot be null. Parameter name: buffer".

I observed that "oof.ObjectData = null" in debug mode.

I have the evolution versions of ASPOSE.Slides and Cells installed in my machine. does this making any limitation.?

Please help me to resolve this..

Thanks

-Jyothi

Console application does not matter, actually the code matters, once you could successfully understand it either by reading it or by running it, you can use it in your asp.net application.

The code actually reads in the source in.ppt and finds the Excel Chart whose alternate_text has been set by me as oleobject, then it creates a worksheet object, update its values, gets it back and then update it.

Just run the project as it is, don't do any modification, it should run successfully.

Or, you can try making the new console application, copy all of its code, add reference to Aspose.Slides.dll and Aspose.Cells.dll, place the in.ppt in debug directory or change the path of it and run it.

Evaluation versions don't have any limitations except of having watermarks.

Hi,

I tried in both the ways but "oof.Objectdata is still null" please help me what will be the possible reason.
My system environment as follows..

Windows Xp, Visual studio 2005 (.Net framework 2.0), MS Office 2003 and Aspose.Slides and Aspose.Cells both are evolution versions..

I deployed it in c:\

Please help me to get out of from this Argument null exception..

Thanks,

-Jyothi

I don’t know what the possible reason is. If you run the project as it is, you don’t even need to place Aspose.Slides.dll or Aspose.Cells.dll anywhere, because they are already present in the \bin\debug folder.

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

But if you had created a new project, you will need to add a reference to aspose.slides.dll and aspose.cells.dll and then run the project.

Below is a screenshot showing how to add reference to dlls (assemblys) in project. Click on Reference in Solution Explorer, browse the dlls and add them

Hi aspose.slides,

Unable to get the ObjectData of an OleObjectFrame (which internally holds Microsoft Excel Chart). can any body help me in this issue?

Its really stoping me to move further in this tool from evaluation version to licensed version.

Thnks,

-Jyothi

Dear Jyothi,

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Luckily, I found your problem, you are having this problem because of Aspose.Slides 2.7.9.0, the earlier versions like 2.7.8.0 will not give you this exception.

Please download the Aspose.Slides 2.7.8.0 dll and update its reference in your project.

http://www.aspose.com/Community/Files/51/aspose.slides/default.aspx

Hi,

Now am able to read the oleobjectframe.objectdata, thanks for your effort to solve this issue..

now am able to manipulate the excel chart data from my .net web application. but the colors of the chart in 'in.ppt' were not applied to the generated chart(out.ppt).., all the colors were washed off

what will be the possible reason(due to Evaluation version).. please help me..

Please find the attached in.ppt and out.ppt files to compare..

Thanks,

-Jyothi

It is not because of evaluation version, probably it is because of a bug in Aspose.Cells, you should try some other version of Aspose.Cells, I used Aspose.Cells 4.1.2.0 and got no problem.