A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.tutorialspoint.com/javaexamples/create_blank_ppt.htm below:

How to create a blank PPT document using Java

How to create a blank PPT document using Java Problem Description

How to create a blank PPT document using Java.

Solution

Following is the program to create a blank PPT document using Java.

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import org.apache.poi.xslf.usermodel.XMLSlideShow;

public class CreatingBlankPPT {
   public static void main(String args[]) throws IOException {
       
      //creating a new empty slide show
      XMLSlideShow ppt = new XMLSlideShow();

      //creating an FileOutputStream object
      File file = new File("example1.pptx");
      FileOutputStream out = new FileOutputStream(file);

      //saving the changes to a file
      ppt.write(out);
      System.out.println("Presentation created successfully");
      out.close();
   }
}
Result

java_apache_poi_ppt


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4