The text extraction code at that link says:

 InputStream inp = new FileInputStream("workbook.xls");
 HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(inp));
 ExcelExtractor extractor = new ExcelExtractor(wb);
 extractor.setFormulasNotResults(true);
 extractor.setIncludeSheetNames(false);
 String text = extractor.getText();

I cannot find HSSFWorkbook in poi-3.1-beta2-20080530.jar. What am I missing?

Also, Doug mentopned that the HSSFRow defines a CellIterator this will allow
you to iterate through
the row and get each element. can anyone point me to sample code.

If I can get this worked out maybe we could post the code to a poi snippet
directory or something. Why should everyone need to reinvent the wheeel
every time to do a common task like. coverting a .xls to a flat file.

Thanks, Tom.

On Thu, May 29, 2008 at 7:28 PM, Andy Chien <[EMAIL PROTECTED]>
wrote:

> Hi Tom:
>
> Though I have not used this feature before, I am aware of the following
> object. Perhaps it can help? I vaguely recall there were some example on the
> apache website but I can not seem to find it anymore.
>
>
> http://poi.apache.org/apidocs/org/apache/poi/hssf/eventusermodel/examples/XLS2CSVmra.html
>
> http://poi.apache.org/hssf/quick-guide.html#TextExtraction
>
> Hope this helps you.
>
>
> Cheers,
>
> Andy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to