You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Vu, Anh" <vn...@hotmail.com> on 2009/02/22 02:40:11 UTC

POI 3.5Beta5 issue

To Whom It May Concern,

 

I downloaded this latest release of POI and tried out the tutorial.  I find that somehow, I'm unable to use the XSSF package.  I looked in the jar file but it doesn't seems the XSSF code is not there.  I realized that it is now combined and used under the interface SS.  But when i tried to write this code:

XSSFWorkbook xssfWB = new XSSFWorkbook();

 

It complain that this class can't be resolved.

I'm unable to import this package.  It doesn't seem to appear in the 3.5-Beta5.jar.

 

Also, when I try the code below:

 

InputStream inp = new FileInputStream("workbook.xls");
    //InputStream inp = new FileInputStream("workbook.xlsx");

    Workbook wb = WorkbookFactory.create(inp);  <------this class highlighted can't be found in the package either.
    Sheet sheet = wb.getSheetAt(0);
    Row row = sheet.getRow(2);
    Cell cell = row.getCell(3);
    if (cell == null)
        cell = row.createCell(3);
    cell.setCellType(Cell.CELL_TYPE_STRING);
    cell.setCellValue("a test");

    // Write the output to a file
    FileOutputStream fileOut = new FileOutputStream("workbook.xls");
    wb.write(fileOut);
    fileOut.close();

 

Please help, I really need this for my work project which is on a tight deadline within a new weeks.  I need it to be able to read .xlsx files.

I notice the source code package I downloaded has XSSF inside folder OOXML.  I have the 3.5-Beta5.jar in my build path.  I am missing any other lib or jars?  Please let me know.  

Any feed back is greatly appreciated.

Thanks in advance,

Anh


_________________________________________________________________
How fun is this? IMing with Windows Live Messenger just got better.
http://www.microsoft.com/windows/windowslive/products/messenger.aspx

Re: POI 3.5Beta5 issue

Posted by Josh Micich <jo...@apache.org>.
Hello Anh,

XSSF is part of the new ooxml stuff which is found in the poi-ooxml jar.

For example, in the latest release, this is the extra jar you need:
http://people.apache.org/~yegor/REL_3_5_BETA5/poi-ooxml-3.5-beta5-20090219.jar

hope this helps,
Josh