hi nick,

i have solved the people of java.lang.NoSuchMethodError only to be
confronted with another.  I have used you cloneStyleFrom(HSSFCellStyle
source).  However, when i open the spreadsheet in MS Excel it still
complains about having to many fonts.  This is my code:

HSSFCellStyle cellNewStyle = setStyle(book, cellOld);
cellNew.setCellStyle(cellNewStyle);
.....
private HSSFCellStyle setStyle(HSSFWorkbook book, HSSFCell cellold){
                
      HSSFCellStyle style = book.createCellStyle();     
      style.cloneStyleFrom(cellold.getCellStyle());

      return style;
                
}

Why do you think it is still causing this problem?


many thanks
mark





Nick Burch wrote:
> 
> On Tue, 15 Jul 2008, mjw_85uk wrote:
>> i have been trying to get the cloneFromStyle(HSSFCellStyle source) 
>> method to work.  However, when i try and call the method to copy the 
>> style i get this error:
>>
>> java.lang.NoSuchMethodError:
>> org.apache.poi.hssf.usermodel.HSSFCellStyle.cloneStyleFrom(Lorg/apache/poi/hssf/usermodel/HSSFCellStyle;)V
> 
> You have an older version of poi on your classpath. You should only have 
> one version, and that needs to be the new one
> 
> Nick
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/HSSFCellStyle-help-tp18401553p18464212.html
Sent from the POI - User mailing list archive at Nabble.com.


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

Reply via email to