poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Mui <da...@muibros.com>
Subject Re: AW: does poi 2.5 support lists
Date Wed, 28 Apr 2004 14:28:34 GMT
You really should enter this to bugzilla, it is way easier to lose track 
of this stuff in the mailing list.

KamalaPothukuchi@BigLots.com wrote:

> 
> hi Karl-Heinz,
> 
> Thanks for the prompt reply.Iam trying to read a simple excel file that 
> contians a list.Iam using POI to read the excel file.I get exception.I 
> wnat to read the fiel and add then write to that file.I need this 
> functionality in my project.I tried doing it to a sample excel file.You 
> said you have not used POI ?do u mean u have not used it to even read 
> the excel file?Even iam using the latest POI version 2.5.
> Iam sending you the client code and the sample excel fiel.coudl you help 
> me out with this.
> Thanks for the help
> Kamala
> 
> ----------------------------------------------------------------------------- 
> 
> POIFSFileSystem fs  =*new* POIFSFileSystem(*new* 
> FileInputStream("c:/excels/trialworkbook.xls"));
>                        
>                 HSSFWorkbook wb = *new* HSSFWorkbook(fs);
>                 HSSFSheet sheet = wb.getSheetAt(0);
>                 HSSFRow row = sheet.getRow(5);
>                 HSSFCell cell = row.getCell((*short*)1);
>                 System.out.println("cell : "+cell);
>                 *if* (cell == *null*)
>                 {
>                           System.out.println("inside if");        
>                   cell = row.createCell((*short*)1);
>                   cell.setCellType(HSSFCell.CELL_TYPE_STRING);
>                   cell.setCellValue("test");
>                 }
>                 *else*
>                         cell.setCellValue("test");
>                       System.out.println(cell.getStringCellValue());
>                       FileOutputStream fileOut = *new* 
> FileOutputStream("c:/excels/trialworkbook.xls");
>                 wb.write(fileOut);
>                 fileOut.close();
>                 }*catch*(Exception e)
>                 {
>                          System.out.println("Exception : "+e);
>                          e.printStackTrace();            
>                 }
>         }
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message