poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46259] HSSFCellStyle.getUserStyleName() returns null
Date Sat, 29 Nov 2008 02:12:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46259


Josh Micich <josh@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #2 from Josh Micich <josh@gildedtree.com>  2008-11-28 18:12:54 PST ---
Is it possible that you need to go one level up with 'getParentStyle()'?

The following code seems to work (I am not sure if it all makes sense though):

URL url = new
URL("https://issues.apache.org/bugzilla/attachment.cgi?id=22909");
HttpURLConnection hconn = (HttpURLConnection) url.openConnection();
HSSFWorkbook wb = new HSSFWorkbook(hconn.getInputStream());
HSSFSheet sheet = wb.getSheetAt(0);
HSSFCellStyle cellStyleA1 = sheet.getRow(0).getCell(0).getCellStyle();
HSSFCellStyle cellStyleA2 = sheet.getRow(1).getCell(0).getCellStyle();
assertEquals("style1", cellStyleA1.getParentStyle().getUserStyleName());
assertEquals("style2", cellStyleA2.getParentStyle().getUserStyleName());


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message