We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Multiple pages excel into PPT with OLE

Dear Team,

We are trying to create the presentation from excel.

Case 1: When we have single page excel, we are getting the PPT in single slide - No issue.
Case 2: When we have multiple pages in excel, we are getting only one slide. Some of the rows are missing in the slide - Issue

My requirement is to create number of slides equals to number of pages in excel based on the page break or anything. Is it possible to solve this using Aspose technology(Java)?

If the answer for the above question is, YES. Then my next requirement is getting the PPT with OLE.
Similarly, I’m able to create the presentation with OLE. When we have multiple pages, how can I achive the PPT with OLE.

Herewith I have attached the code which I have used to convert the excel into Presentation slide.

Prabu R

Hi Prabu,

Thank you for contacting Aspose support.

I am afraid, we require the input spreadsheets along with executable sample code to properly analyze the presented scenario on our side. Please note, as you are using multiple Aspose APIs, it is important that we first identify the problem cause by executing your code against your samples in order to assist you in this regard. Moreover, your current code has many variables whose initialization isn’t specified therefore it isn’t helpful at the moment. Therefore it is advised to share executable code along with the input & output documents.

Regarding your concerns about saving the spreadsheets to separate images (page by page), it is possible using the SheetRender class, however, you have to set the ImageOrPrintOptions.OnePagePerSheet to false because by setting it to true whole worksheet will be rendered to one image. Please review the detailed article on converting worksheet to images.

[Edited] In your code as follow, you are rendering only 1st page of the worksheet, that could be the reason for trimmed rows in the rendered image. Please refer to the article linked above on how to render all pages of the worksheet to separate images. Moreover, if you are not certain how to insert separate images to separate slides of the presentation, you may need to create a thread in Aspose.Slides support forum in order to get help in this regard.


ByteArrayOutputStream imageStream = new ByteArrayOutputStream();
sheetRender.toImage(0, imageStream); //renders only one page at 0 index
byte[] imageByteArray = imageStream.toByteArray();