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 2008/08/01 00:24:56 UTC
DO NOT REPLY [Bug 45518] New:
poi.ss.usermodel.Sheet.setColumnWidth(column, value) creates invalid code
https://issues.apache.org/bugzilla/show_bug.cgi?id=45518
Summary: poi.ss.usermodel.Sheet.setColumnWidth(column, value)
creates invalid code
Product: POI
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
AssignedTo: dev@poi.apache.org
ReportedBy: pdobson@viranim.com
poi.ss.usermodel.Sheet.setColumnWidth(column, value); method creates invalid
XML when setting the column width for column 0.
short column = 0
short value = 10
wb = new XSSFWorkbook();
Sheet workSheet = wb.createSheet("Report");
workSheet.setColumnWidth(column, value); //creates invalid XML
The above code generates the following invalid XML in the sheet1.xml file:
<col min="0" max="0" width="10"/>
It likely should create
<col min="1" max="1" width="10"/>
The code is invalid because columns start a 1, not 0 in xlsx files. HSSF
starts columns at 0
Discussion on dev user list is that XSSF columns should be 0 based and create
XML that is 1 based so that the method behaves the same as in HSSF. In any
case, it seems to me that an exception should be thrown before allowing invalid
XML to be generated for an invalid column.
--
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 45518]
poi.ss.usermodel.Sheet.setColumnWidth(column, value) creates invalid code
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45518
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Nick Burch <ni...@torchbox.com> 2008-09-15 13:55:33 PST ---
Now fixed in svn (affected more than just setColumnWidth, so took a little
while to sort out)
--
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