Re: Please help with ppt to txt code snippet...

2007-04-18 Thread Rupanu Ranjaneswar

Thanks for your ardent help Rajeshwar,I really
appreciate it.
  Just wanted to ask what do I need to do to run
the same code in Linux environment, as it successfully
runs in windows.







 
--- Rajeshwar Mothe [EMAIL PROTECTED] wrote:

 Hi dudes  POI users  Mr.Rupanu Ranjaneswar
 
  try this code also
 
  its working fine yar
 
  by c u dudes
 
  have a good day
 
 
 
 
 
 import java.io.*;
 import java.util.*;
 import

org.apache.poi.hslf.extractor.QuickButCruddyTextExtractor;
 public class ppt2{
 
   public ppt2(){
 
   }
   public static void main(String[] args){
 
 try{
 
   FileInputStream in = new
 FileInputStream(C:\\Log4J.ppt);
 
 
  String str = ;
 

org.apache.poi.hslf.extractor.QuickButCruddyTextExtractor
  ppe = new

org.apache.poi.hslf.extractor.QuickButCruddyTextExtractor(in);
 
   Vector  v = new Vector();
   FileWriter fw=new
 FileWriter(C:\\newppt.txt);
 
 
 
 v = ppe.getTextAsVector();
 
 
   //Fetches the ALL the text of the
 powerpoint file, in a vector of
 strings, one per text record
 
 for (  Enumeration e = v.elements() ;
 e.hasMoreElements() ;) {
 System.out.println(e.nextElement());
 
str = str + e.nextElement() ;
fw.write(str);
   }
 
fw.close();
ppe.close();
 }
 
 catch (Throwable t){
   t.printStackTrace();
 }
   }
 }
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



Please help with ppt to txt code snippet...

2007-04-17 Thread Rupanu Ranjaneswar
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: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/



query from newbie:how to read openoffice documents

2007-04-09 Thread Rupanu Ranjaneswar
Hello everyone,
I am new to POI and I am able to successfully read MS
format files.But now I want to convert openoffice
documents to txt files(read and write).I tried on .odt
but could not.Can anyone help with that?


 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/