You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/07/04 10:53:27 UTC
DO NOT REPLY [Bug 51469] New: XSSFRow.setRowStyle not implemented
https://issues.apache.org/bugzilla/show_bug.cgi?id=51469
Bug #: 51469
Summary: XSSFRow.setRowStyle not implemented
Product: POI
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: XSSF
AssignedTo: dev@poi.apache.org
ReportedBy: hoernlein@uni-wuerzburg.de
Classification: Unclassified
Created attachment 27249
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27249
extraced xlsxs 'a' & 'b'
for HSSFRow there is setRowStyle method, XSSFRow lacks this method.
attached you'll find extracted xlsx a & b, the differing files are
xl/worksheets/sheet1.xml resp.. in both files there is a '1' in cell A1, which
has a certain format (bottom border black thin). in file 'b' the 1st row
additionally has the same format set as row format.
the differing part is:
<row r="1" spans="1:1">
vs.
<row r="1" spans="1:1" s="1" customFormat="1">
so i guess the code from XSSFCell should work for XSSFRow (+ customFormat), so
it should be something like:
public void setCellStyle(CellStyle style) {
if(style == null) {
if(_row.isSetS()) { // + maybe something like: "||
_row.isSetCustomFormat()"
_row.unsetS();
_row.unsetCustomFormat();
}
} else {
XSSFCellStyle xStyle = (XSSFCellStyle)style;
xStyle.verifyBelongsToStylesSource(_stylesSource);
long idx = _stylesSource.putStyle(xStyle);
_row.setS(idx);
_row.setCustomFormat(true);
}
}
the _stylesSource of XSSFRow could be handled exactly like for XSSFCell (as
it's only a pointer to row.getSheet().getWorkbook().getStylesSource()).
--
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
DO NOT REPLY [Bug 51469] XSSFRow.setRowStyle not implemented
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51469
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Nick Burch <ni...@alfresco.com> 2011-07-08 14:58:49 UTC ---
Thanks for this investigating. I've added support for setting row styles to
XSSF and SXSSF in r1144348, along with unit tests. I've also promoted the
getter and setter to the Row interface
--
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