Adding Charts from data worksheet using oleObjectFrame

Hello ,



I would like to know some things on oleObjectFrame.


  1. Is it compulsory to make the worksheet as chart sheet like
    Dim chartSheetIdx As Integer = wb.Worksheets.Add(SheetType.Chart)
    or we can even add chart in normal worksheet as get the chart from it using
    Dim imgChart As Bitmap = wb.Worksheets(2).Charts(0).ToImage().
  2. I am having a scenario in which i have many charts and each chart is having the data above that only i am attaching a excel file for your reference as step2.xls this excel i have prepare
    using aspose.cells now i want to export all the charts from this excel to PPT
  3. Also if it is compulsory to make the worksheet as chart sheet then can i add multiple chart is that one worksheet or for different chart i have to create different sheets kindly provide me some code reference for this
Kindly revert me as soon as possible

Thanks & Regards
Lakdawala Zaid



Hi Zaid,

I like to share that it is not compulsory to use the SheetType.Chart only and you may also use SheetType.WorkSheet as well when creating using Aspose.Cells. Moreover, in Aspose.Slides you are adding excel file as Ole object, so whether the its a chart sheet, data sheet or data sheet with charts, it will display them. So, if the sheet has multiple charts in it that will also be displayed. Hope it clears the concept. The issue here is that you need to set the sheet and ole frame size as they are capable of displaying only limited portion of sheet. If you wish to display the complete sheet in Ole frame then resolution will be too small to view the things. For sake of reference to sheet size and ole frame size, please read this article.

Secondly, I will request Aspose.Cells team to share further response on SheetTypes for your kind reference.

Thanks and Regards,

Hello Muddasir,

In my case i have multiple charts on one sheet and what i want is to displauy each chart on different slides
i dont want full sheet to get display on one slide but on different.

Like can i create different images as
Dim imgChart1 As Bitmap = wb.Worksheets(2).Charts(0).ToImage().
Dim imgChart2 As Bitmap = wb.Worksheets(2).Charts(1).ToImage().
Dim imgChart3 As Bitmap = wb.Worksheets(2).Charts(3).ToImage().
.
.
.
and then export all that images to PPT using different OLE frames


Thanks & Regards
Lakdawala Zaid

Hi Zaid,

You can access the charts on same sheet and can display then on separate sheets using separate Ole frames. As in example shared by you here you have displayed multiple charts from separate sheets on two different slides. Similarly, You can also access the charts on the same sheets as well as you have mentioned above.

Thanks and Regards,

oleObjectFrame is not working on MAC i am having a MAC machine with mac office 2011install on it when i open the exported PPT file and try to double click the slide it does not open any excel in it

Kindly revert back

Thanks & Regards
Lakdawala Zaid

Hi Zaid,


Please share the source presentation, your project code and generated presentation with us for necessary investigation on our end. Please share which version of Aspose.Slides you are using along with the information about the environment where you are generating your presentation.

Thanks and Regards,

hello mudassir



I am using aspose.slides version 5.0.1.0 and aspose.cells version 5.3.1.0



i am attaching the ppt that i generated using ole frames

the problem i am facing is when i export the ppt on window and then open
that ppt from MAC it works fine but when i export it on MAC and open
there it doesn’t work also when i export on mac and open on windows it
is working fine



I am attaching a code set for your help and also the excel file that can be used to generate the ppt


Dim licSlide As Aspose.Slides.License = New Aspose.Slides.License()
licSlide.SetLicense(“D:\Aspose Data\Aspose.Total.lic”)

Dim licCell As Aspose.Cells.License = New Aspose.Cells.License()
licCell.SetLicense(“D:\Aspose Data\Aspose.Total.lic”)

Dim pres As Presentation = New Presentation()
Dim Workbook As Aspose.Cells.Workbook = New Aspose.Cells.Workbook(“D:\Aspose Data\test.xls”)

Workbook.CalculateFormula()
Dim i As Integer = 0
Dim intsheetcount As Integer = 4

For i = 0 To intsheetcount - 1
Workbook.Worksheets.ActiveSheetIndex = i
Dim wbStream As MemoryStream = Workbook.SaveToStream()
wbStream.Position = 0
Dim imgChart As Bitmap = Workbook.Worksheets(i).Charts(0).ToImage()
Dim sld As Slide = pres.AddEmptySlide()
AddExcelChartInPresentation(pres, sld, wbStream, imgChart, "Chart " + (i + 1).ToString())
Next
pres.Write(“D:\ChartDemo.ppt”)




kindly provide the necessary solution





Thanks & Regards

Lakdawala Zaid

Hi Zaid,

I have investigated the issue shared and have been able to reproduce it. An issue with ID 30900 has been created in our issue tracking system to further investigate and resolve the issue. This thread has also been linked with the issue so that you may be automatically notified once the issue is resolved.

Thanks and Regards,

Hello Mudassir,
This was one of the most important thing for us as the feature has been build up and we have promise to deliver it.Also i would like to tell u that its whole as a feature in not working on MAC and as we have many MAC user it becomes a flop show for us to deliver this feature so i would really request you to arrange something to solve this issue and deliver to us may be as a patch or something else.It would really be great and we will feel honored to get served as we are great fan of aspose and using your tool from years.

Thanks & Regards
Lakdawala Zaid


Hi Zaid,

We really appreciate your keen interest in our product. I like to share that the issue specified has been added recently in our issue tracking system. Our development team will investigate and schedule the issue. As soon as some further information is shared, I will be happy to share that with you. Moreover, please elaborate your following statement further and also share some code sample and input data to reproduce that.

“Also i would like to tell u that its whole as a feature in not working on MAC”

Thanks and Regards,

Hello Mudassir,
as u said me that you were able to reproduce the issue on MAC the main functionality on this feature is that user can click on the slide that will open the excel sheet now user can edit the data and the changes will get reflect in the slide and as you know that on clicking on the slide it is not opening the excel sheet so i said u that it is whole as a feature is not working on MAC.

Thanks & Regards
Lakdawala Zaid

Hi Zaid,


Thanks for sharing the information. Our development team will investigate and resolve the issue. At the moment the issue is unscheduled for investigation by our development owing to pending issues of Enterprise and Priority support customers. Once the issue will be resolved, we will be really happy to share the information with you.

Thanks and Regards,

Hello,
Today i upgraded by aspose.slides from 5.0.1 to the latest one and now when i double click the slide created using oleframe and mention in the above posts it is giving me this error

The server application, source file, or item can’t
be found, or returned an unknown error. You may need to reinstall the
server application

So i tried changing my dll again back to the previous version and it worked so is there any problem with the new dll

Thanks & Regards
Lakdawala Zaid

Hi Zaid,


I have worked with the data and code shared in your this post using Aspose.Slides for .NET 6.1.0. I have successfully generated the presentation and can edit the Ole frames in generated presentation using PowerPoint 2010 in Windows 7 x64 environment without any issue. For your kind reference, I have shared the generated presentation as well. You may please try using the same on your end for further verification.

Many Thanks,

Hello,
I am not able to work with 6.1.0 as my license in valid till 31st december 2011 so the latest for me was 5.8.0 and in this version it is not working i tried 5.7.0 and it worked fine with that

Thanks & Regards
lakdawala Zaid

Hi Zaid,


You may be right that the issue might be there in Aspose.Slides for .NET 5.8.0 or 5.7.0. But, I have tested created the presentation using Aspose.Slides for .NET 6.1.0 and it works as well when I open the presentation in PowerPoint 2010. I may request you to use try using Aspose.Slides for .NET trial version for instance and if you confirm the issue as resolved then please renew your subscription to avail the feature. Actually, as per company policy, the support is always provided in latest available product version. Please also read this renewal subscription policy for your reference.

Many Thanks,