I updated a Powerpoint slide with an embedded Excel chart. I updated the Chart using Aspose.Cells' Smart Marker feature. The problem is that it appears that Aspose changed the format of the data labels. I am attaching three slides (original one, one after update, templatewith smart markers) for this posting so you can see the difference.
The label on the top of each blue bar shows the height or value of each blue bar. After updating with current data, Aspose changed the background color the label for the blue bars so you see a little black rectangle in the background of each label. Why is this?
I am expecting the format to be just the same as the original. Note that my code does not touch any formating at all, it just calls Aspose.Cells.WorkbookDesigner to inject data into the smart markers.
My code is like this:
Dim dsBenchmarkReturn As DataSet = Me.getPeBenchmarkReturnData()
Dim dtBmkReturn As DataTable = dsBenchmarkReturn.tables(0)
Dim chartShape As Shape = slide.FindShape("ComparisonWithBenchmarkChart")
Dim oof As OleObjectFrame = CType(chartShape, OleObjectFrame)
Dim mstream As MemoryStream = New MemoryStream(oof.ObjectData)
Dim designer As Aspose.Cells.WorkbookDesigner = New Aspose.Cells.WorkbookDesigner()
designer.Open(mstream)
designer.SetDataSource(dtBmkReturn)
designer.SetDataSource("SP500", SP500)
designer.SetDataSource("MSCI", MSCI)
designer.Process()
oof.ObjectData = designer.Workbook.SaveToStream().ToArray()
To make sure it is not Aspose.Slides that is causing the problem, I write out the designer workbook to an excel file.
The excel output file indeeds has the background of data labels changed to black.
This is how I dumped out the excel file:
Dim ms As MemoryStream = designer.Workbook.SaveToStream()
Dim fout As FileStream = New FileStream("c:\Temp\out.xls", FileMode.OpenOrCreate, FileAccess.Write)
fout.Write(ms.ToArray(), 0, CInt(ms.Length()))
fout.Close()
To summarize, I do not want Aspose.Cells to change the format of the data labels. How can fix this?