Using Aspose.Slides for Java to Convert Excel and PDF Files to PPT/PPTX

Friends,

I am new to Aspose, we have a requirement for converting excel/pdf output which is generated using the SAP Business Objects Java API, Business Objects doesn’t support ppt/pptx format, so we decided to check if we can leverage Aspose Java API, since Business Objects report generation can be customized using their Java API, need your guidance what approach I need to follow, if any one you have sample code for generating ppt/pptx from excel/pdf that will great help to start for beginner like me

Thanks
Mohan

Hi Mohan,


Thanks for your interest interest in Aspose.Slides.

I have observed the requirements and regret to share that Aspose.Slides does not possess the support for generating the PPTX/PPT from PDF. An issue with ID SLIDESNET-33808 has already been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

Hi Fayyaz,

Thank you for immediate response, I have below output in “byte[]” can we convert it into ppt using the Aspose?

// Retrieve the binary output of the xls document
BinaryView binaryView = (BinaryView)boDocumentInstance.getView(OutputFormatType.XLS);
byte[] abContent = binaryView.getContent();
String lTimeStamp = dateFormat1.format(new Date()).toString();
String outputFile = outputDir + pReportDesc + “.xls”;
saveDocument(abContent, outputFile);

private void saveDocument (byte[] abContent, String strFileName)
{
try
{
System.out.println("[" + (new Date()).toString() + “] saveDocument(” + strFileName + “)\r”);
// Save the binary view of the document to the file system
FileOutputStream objFileOutputStream = new FileOutputStream(strFileName);
objFileOutputStream.write(abContent);
objFileOutputStream.close();
} catch(Exception ex) {
System.out.println(ex.getMessage());
}
} // end saveDocument

Thanks
Mohan

Hi Mohan,


I have observed the sample code shared and like to share that you cannot directly convert excel file to PPT as these two are entirely different things internally. However, you can add the excel file in presentation using Ole frames. Please follow this documentation link for your convenience as this is the right way forward. Please share if I may help you further in this regard.

Many Thanks,

Hi Fayyaz,

Thank you for response, sure will take a look at the OLE implementation. What jar files I need use for this from Aspose. We are planning to deploy this in AIX/Unix on Weblogic application server, what to know if this implementation will work?. Also if you can share with me sample implementation for my scenario that will great help.

Thanks
Mohan

Hi Mohan,

Please try using the sample code shared over this documentation link. You need to use Aspose.Slides for Java 7.2.0 on your end to use the shared sample code. Please share, if I may help you further in this regard.

Many Thanks,

Hi Fayyaz,

Do we have any disadvantage of using OLE in PPT, can ppt be editable and OLE will be placed as link from excel into ppt?

Also I received the attached code from one of my friend he did in .NET Aspose API to convert excel to ppt, could you please guide me If I can achieve the same using Aspose Jave API.

We need to make it working in Java, since my company is finalizing to buy the licensed copy of Aspose once I confirm that we are able to get the desired result. Your help in this regard is really appreciated

Thanks
Mohan

Hi Mohan,

I like to share that one cannot convert excel to PPT. The code snippet that you have shared is also not converting excel to PPT. It is actually loading excel file, generating the sheet emf image and then adding that as picture frame in Aspose.Slides presentation shape. It is not even adding excel sheet as Ole frame. When you add excel file as OIe frame inside Aspose.Slides, it actually gets embedded in the presentation rather then being linked. I have already share the documentation link where by you can find running samples for playing with ole frames inside Aspose.Slides.The shared link also contain the example for accessing the existing ole frame data and updating that using Aspose.Cells.

I have also worked over .NET sample code shared by you and have ported the Aspose related code section to work with Aspose.Slides for Java and Aspose.Cells for Java. I have shared the ported java file for your reference.

Many Thanks,

The issues you have found earlier (filed as SLIDESNET-33808) have been fixed in this update.