Apache POI (PowerPoint) - Course And Certification

SIITGO is the best place to get effective I.T Training and Certification Online.


  • Apache POI (PowerPoint) - Course And Certification

    PowerPoint, as you may know, is a tool developed by Microsoft used for the creation of presentations in the form of slides. Marketers use it for creating captivating pitches, teachers use it to graphically communicate their ideas etc. 

    But it doesn’t end there – with Apache POI PowerPoint, a programmer can create astonishing presentation merely using Java. 

    For Example:

    The good first step to getting started with PowerPoint Presentation is creating a new file, and to do this you will need to call the XMLSlideShow function using the following line of code: 

    XMLSlideShow ppt = new XMLSlideShow(); 

    Next is to create a new PowerPoint document – the code below should get the job done 

    import java.io.FileOutputStream;
    import java.io.IOException;

    import org.apache.poi.xslf.usermodel.XMLSlideShow;
    import org.apache.poi.xslf.usermodel.XSLFSlide;

    public class CreatePresentation {

    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()
    }
    }

    Creating and editing slides in PowerPoint using Apache POI 
    To create a new slide in PowerPoint using Java, call the XSLFSlide Function. Other functions you will need as you work are:

    XSLFBackground getBackground(): This function is used for formatting the background of slides in PowerPoint. It lets a user specify background colour and use an image as background.

    XSLFSlideLayout getSlideLayout(): Lets a user modify and edit the layout of a particular slide. 

    XSLFSlide importContent(XSLFSheet src: To extract the properties of a particular slide and copy them unto another. 

    When working on a presentation, the need to write and edit texts may arise. Not to worry –Apache POI has got some cool tool to handle this. Here are some of the functions and what they do: 

    · XSLFTextRun addLineBreak(): For inserting line breaks when starting a new paragraph 

    · void setIndent(double value): For adding indentation to a block of text 

    · void setTextAlign(TextAlign align): Does the job of text alignment. 

    · void setBold(boolean bold): For bolding texts 

    · void setFontSize(double fontSize): Does the work of setting font size.

  • Full Course: Features and Benefits

    24/7 Unlimited Access
    Login & Study Online
    Self-Paced Interactive Learning
    Practical Web and Video Lectures
    Industrial Training
    Exams Re-Take Available
    Earn I.C.T Diploma Certificate
    Real-Time Jobs Finder
    Professional CV Builder

    Course Duration:
    10 - 20hrs | Study at Your Pace.

    Course Venue:
    100% Online Study.

    Course Certification: Diploma.

    Apply Here | Choose Course >>



    Back to Courses Page

    Back to Blog Posts

82% Scholarship Admission

The Scholarship offer gives you opportunity to take our Course Programs and Certification valued at $50 USD for a reduced fee of $9 USD - Offer Closes Soon!!

Copyrights © 2018 SIITGO - Scholars Institute of Information Technology Online. All Rights Reserved.