Hi Linda,

Formulas are NOT supported in POI 1.5 and you should NOT use POI 1.5.0 
anyhow.  You should use POI 1.5.1 (which is the latest "production" 
version with only minor bug fixes over 1.5.0)  if you needa "blessed" 
version (but do not need formulas).  

If you need Formulas support, I would recommend using the 1.7-dev 
version.  It in all probability supports the "simple" formulas you're 
using, however, due note it does not *calculate* them.

I'd appreciate it if you'd email the poi-user list directly instead of 
me.  You're very lucky that I even GOT this message (my email is very 
very unreliable thanks to the increadibly bad Time Warner Cable 
RoadRunner mail server).  Most days I get about 40%-60% of the email 
sent to me.  On the list you're likely to get an answer from myself or 
someone else.  For instance Avik Sengupta who wrote most of the formula 
stuff might be able to give more details on what formulas are supported 
and what aren't.

Thanks,

-Andy

TRAN,LAM (Non-HP-Cupertino,ex1) wrote:

>Andy,
>
>Sorry for bothering you  I'm desparately need help to find out if I can
>continue to use POI to read our spreadsheet. I just used the sample program
>below to parse a manually created xls file and every thing works. However,
>when it encounters a cell whose value is computed by a simple  formula like
>column E3=D2,  I got a  NULL cell returned. I'm using 1.5 final version and
>wonder if formula cells supported in that version or I just did something
>wrong. If it doesn't for now, will it in the near future ?
>
>I know it's too much to ask you such a question by emailing like this but if
>you don't mind giving me a quick reply then I truly appreciate your
>kindness. 
>
>Thanks a lot.
>
>Linda
>
>
>public static void main( String [] args ) {
>try {
>InputStream input = POIExample.class.getResourceAsStream( "qa.xls" );
>POIFSFileSystem fs = new POIFSFileSystem( input );
>HSSFWorkbook wb = new HSSFWorkbook(fs);
>HSSFSheet sheet = wb.getSheetAt(0);
>
>// Iterate over each row in the sheet
>Iterator rows = sheet.rowIterator(); 
>for( HSSFRow row = (HSSFRow) rows.next(); rows.hasNext(); row = (HSSFRow)
>rows.next() ) {
>System.out.println( "Row #" + row.getRowNum() );
>
>// Iterate over each cell in the row and print out the cell's content
>Iterator cells = row.cellIterator();
>for( HSSFCell cell = (HSSFCell) cells.next(); cells.hasNext(); cell =
>(HSSFCell) cells.next() ) {
>
>System.out.println( "Cell #" + cell.getCellNum() );
>switch ( cell.getCellType() ) {
>case HSSFCell.CELL_TYPE_NUMERIC:
>System.out.println( cell.getNumericCellValue() );
>break;
>case HSSFCell.CELL_TYPE_STRING: 
>System.out.println( cell.getStringCellValue() );
>break;
>default:
>System.out.println( "unsuported sell type" );
>break;
>}
>}
>
>}
>
>} catch ( IOException ex ) {
>ex.printStackTrace();
>}
>}
>
>}
>
>
>
>  
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to