Modifying/adding data to an existing ppt file slide

Hi there…

I’m trying to do this:
Open a template ppt file that contains a chart (OleObjectFrame as I understand it).
Now I want to modify the data in the chart cell by cell.

How do I do this?

Right now I’m trying by doing it like this:
OleObjectFrame _oof = (OleObjectFrame)_slide.FindShape( “Chart1” );
Stream ms = new MemoryStream( _oof.ObjectData );
Workbook chartBook = new Workbook();
chartBook.Open( ms );

… after this I’m adding data to the woorkbook…

However when I get to the last line “chartBook.Open( ms );” I get the error “Object reference not set to an instance of an object.”. This is however not true as both ms and chartBook are objects (This is what Visual Studio is telling me).
The ms object contains 46080 bytes, so it’s not that either.

Could there be some compatability problems with the chart I’m getting the ObjectData from?

I would be very please with a solution for this.
I’m currently trying this product out so this is an evaluation version, but if this works the company probably will buy licences.

Thanks,
Vide

Are you sure this chart is Excel chart? If I’m not mistaken,
Aspose.Cells can’t open standard MS Draw charts.

Okay, it’s probably a graph chart. But how can I modify the data of the chart object with Sspose.Slides?

You can’t do it with Aspose.Slides. MS Draw is separate Office application and
there are no Aspose components to manage this file format.

Not even the data it builds the graph from?

Are there any plans for adding this functionality to Aspose? If not, are there any other components that does this?

Thanks for answering! :slight_smile:

You can try office automation (VBA) for this purpose.

I have tried that localy (and it works) but also heard that you should not be using it on a server, what is your opinion about that?

The main problem is that office automation does not cater reentrancy. It can handle/process one request at a time, while at server multiple requests can come simultaneously for processing.

So office automation is good for desktop users but not for web users. In order to process multiple requests at a single time, you will have to queue all incoming requests and then process them one by one.

For more info, see this article.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q257757#kb2

Hi,

I know this is the very older post, Anyway I have the same requiremnt modifying data of an excel chart(not grpah chart). I have Aspose.slides and Aspose.Cells installed, please help me...

Thanks,

Jyothi

Did u got solution for this problem?

If u have solution please share with me...

Thanks,

Jyothi

No solution for the server, it works on the desktop thou.

/ Vide

Hi Vide,

Can u give me the code..

Thanks,

-Jyothi