Hi,
Is there any way to compare 2 CellStyle. I can see HSSFCellStyle class
over-ride hashCode and equals method. But this code is not working.
HSSFWorkbook workBook = new HSSFWorkbook();
HSSFCellStyle style1 = (HSSFCellStyle) workBook.createCellStyle();
HSSFCellStyle style2 = (HSSFCellStyle) workBook.createCellStyle();
if(style1.equals(style2))
System.out.println("Styles are same");
else
System.out.println("Styles are Different");
Output is:
Styles are Different
As i have not applied any formatting i was expecting result to be same.
Before creating a new CellStyle i am checking if it already exist.
Thanks,
Ambikesh
--
View this message in context:
http://apache-poi.1045710.n5.nabble.com/Comparing-CellStyle-tp4783036p4783036.html
Sent from the POI - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]