Bug 18295 - Cannot use < or > in formula
Summary: Cannot use < or > in formula
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: unspecified
Hardware: All other
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-24 21:49 UTC by questanser
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description questanser 2003-03-24 21:49:43 UTC
Hello,

When  "SUM("$H1:$R1")<=1" formula is used in cell.setCellFormula(), it is 
interpereted as
SUM("$H1:$R1) i.e <=1 is ignored



====Sample Code ===

while (rownum <60)
                    {
                        // create a row
                        r = s.createRow(rownum);
                        String formula =
"SUM($H"+rownum+":$R"+rownum+")<=1";
                        
System.out.println("*****formula =" + formula);
                        
                        cellnum = 0;
                        c = r.createCell(cellnum);
                        c.setCellValue( "abc"); //1
                    
                        
                                            
                        cellnum ++;
                        c = r.createCell(cellnum);
                        c.setCellFormula(formula); //8
                                           
                        
                        cellnum ++;
                        c = r.createCell(cellnum);
                        c.setCellFormula(formula); //9
                       
                                              
                        cellnum ++;
                        c = r.createCell(cellnum);
                        c.setCellFormula(formula);
//10
                       
                        
                       
..and all other cells.
Comment 1 Danny Mui 2003-05-08 00:16:40 UTC
Patch committed 05/06/2003