I am trying to update an excel chart imbedded in a Apose.Slide. I first get the OleObjectFrame from the slide and convert it to a WorkbookDesigner. It seems that WorkbookDesigner.process() does not change the original workbook or OleObjectFrame . My question is this: must I have the last highlight RED line in the example below in order to change the original OleObjectFrame?
Private Sub updateVintageYearPerformanceChart(ByVal oof As OleObjectFrame)
Dim ds As DataSet = getVintageYearPerformanceChartData() Dim dtChartData As DataTable = ds.Tables(0) dtChartData.TableName = "ChartData"
' Open chart with Aspose.Excel Dim mstream As MemoryStream = New MemoryStream(oof.ObjectData) Dim designer As Aspose.Cells.WorkbookDesigner = New Aspose.Cells.WorkbookDesigner() designer.Open(mstream) designer.SetDataSource(dtChartData) designer.Process() oof.ObjectData = designer.Workbook.SaveToStream().ToArray() ' is this what I need to do?
Here is the slide but it could be any slide with an excel chart imbedded in it. There is nothing special about the slide. Of course, the chart has the "smart markers" that can be used by Apose.Cells to update the chart.
We checked Workbook.SaveToStream method, it works fine. All smart marker has been replaced with data values. Please double click the slide and check the data of "Sheet1" in the PPT. You will see the correct data.
I think you want to change the image of OleObjectFrame in the PPT. You should call ChartToImage method and replace the old image with the created image after you process smart markers.