Just for further clarification to the problem... how are you getting rowNumber, second by all the rows with same color what do you mean do you mean they are all aqua or they are all white?

I am asking because there might be possibilities that code is not going into the if block. I think this would help people better understand your code excerpt.


Cheers,

Andy Chien




suriz4u wrote:
In my application there is requirement that alternative rows should be
colored.As iam using different styles for different
objects(Ex:Long,Integer,Float etc..).I tried to use in following way for
different objects

 HSSFCellStyle csDouble= wb.createCellStyle();
  if(!(rowNumber%2==0))
      { csDouble.setFillForegroundColor(HSSFColor.AQUA.index);
        csDouble.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND);}
But to my surprise i got all the rows with same color.Iam really confused.
Can any one help me out please..............


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

Reply via email to