poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajeshwar Mothe" <rajkisha...@gmail.com>
Subject Re: Please help with ppt to txt code snippet...
Date Wed, 18 Apr 2007 15:30:37 GMT
hi Rupanu Ranjaneswar


  this code is working

  dont fell tence ever we r POI users and its working perfectly

 if there are any querys mail me

 by c u have a nice day


import java.io.*;
import org.apache.poi.hslf.extractor.PowerPointExtractor;
public class ppt{

  public ppt(){

  }
  public static void main(String[] args){

    try{

      FileInputStream in = new FileInputStream("C:\\raju.ppt");


     String str;

PowerPointExtractor ppe = new PowerPointExtractor(in);
               str=ppe.getText();


      FileWriter fw=new FileWriter("C:\\newppt.txt");

               fw.write(str);
               fw.close();
               ppe.close();
}

    catch (Throwable t){
      t.printStackTrace();
    }
  }
}


On 4/18/07, Rupanu Ranjaneswar <rupanu_pal@yahoo.com> wrote:
>
> Hello ,
>         I urgently and immediately need to convert
> some of my powerpoint files into txt files.I tried to
> use hslf but it's giving problems for slides with
> templates..Can anyone Please heilp with a code snippet
> do it..For your reference i am pasting my code here.
> <<--START CODE-->>
> String str;
>
> PowerPointExtractor ppe =
> newPowerPointExtractor(filename);
>                 str=ppe.getText();
>
>        FileWriter fw=new FileWriter("F:\\newppt.txt");
>
>                 fw.write(str);
>                 fw.close();
>                 ppe.close();
> <<--END CODE-->>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message