excel to PowerPoint

Convert Excel to PowerPoint in Java

Excel and PowerPoint are two widely used applications that are essential in many businesses and industries. Excel is commonly used to store and organize data, while PowerPoint is often used to create presentations and slideshows. Converting Excel files to PowerPoint presentations is a common task that many people need to do, and doing it manually can be time-consuming and prone to errors. In this blog post, we will provide a comprehensive guide on how to convert Excel to PowerPoint using Java REST API. We will cover different techniques that can be used to automate the conversion process and make the process efficient. Whether you’re a developer or a business professional, this guide will help you streamline your workflow and save time. Let’s get started!

Excel to PowerPoint Conversion API

Aspose.Cells Cloud SDK for Java is a powerful cloud-based API that provides a wide range of capabilities for working with Excel files. Some of the key capabilities include Excel to PowerPoint, XLS to PDF, XLS to HTML, Merge and Split Excel files and much more. The API is designed to be flexible and customizable, so developers can build solutions that meet their specific needs. Automate and streamline your Excel-related tasks in the cloud, without needing to install any software or hardware.

Now the first step is to add the SDK reference in Java project.

<repositories>
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>https://repository.aspose.cloud/repo/</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-cells-cloud</artifactId>
        <version>22.8</version>
    </dependency>
</dependencies>

In case you haven’t subscribed over Aspose Cloud, please create a free account using valid email address. Then fetch the Client ID and Client Secret details from dashboard.

Convert Excel to PowerPoint in Java

This section shares the details on how to convert Excel to PowerPoint using Java.

  • Create an instance of CellsApi while passing client credentials as input arguments.
  • Create variables holding input Excel name, resultant format as PowerPoint, and output file name.
  • Read Excel file from local drive using File instance.
  • Then upload the Excel worksheet to cloud storage using uploadFile(…) method.
  • Finally, call the method cellsWorkbookGetWorkbook(…) to perform the Excel to PowerPoint conversion. After the conversion, the resultant file is saved in Cloud storage.
excel to PPTX preview

Image1:- Excel to PowerPoint Conversion preview

You may consider downloading the input Excel workbook and resultant PowerPoint from myDocument.xlsx and Resultant.pptx, respectively.

Inserting Excel into PowerPoint using cURL Commands

Since REST APIs can easily be accessed via cURL commands, so in this section, we are going to convert XLS to PPT using cURL commands. Now, the first step is to generate a JWT access token while executing the following command.

curl -v "https://api.aspose.cloud/connect/token" \
-X POST \
-d "grant_type=client_credentials&client_id=bb959721-5780-4be6-be35-ff5c3a6aa4a2&client_secret=4d84d5f6584160cbd91dba1fe145db14" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: application/json"

Now that we have our personalized JWT token, we need to execute the following command to load an Excel from cloud storage, perform the conversion to PowerPoint and save the output in cloud storage.

curl -v -X GET "https://api.aspose.cloud/v3.0/cells/input.xlsx?format=PPTX&isAutoFit=true&onlySaveTable=true&outPath=Resultant.pptx&checkExcelRestriction=true" \
-H  "accept: application/json" \
-H  "authorization: Bearer <JWT Token>"

Conclusion

In conclusion, the Aspose.Cells Cloud provides a powerful and flexible solution for converting Excel files to PowerPoint presentations and working with Excel data in the cloud. By using this API, you can streamline your workflow and automate Excel-related tasks, enabling you to save time and minimize errors. In this blog post, we have provided a comprehensive guide on how to convert Excel to PowerPoint using Java. We hope that this blog post has been helpful in providing details necessary for your business or development needs.

In case you encounter any issue while using the API, please feel free to contact us via the product support forum.

We highly recommend visiting the following links to learn more about: