Bug 52314 - SheetUtil.getColumnWidth could be more flexible.
Summary: SheetUtil.getColumnWidth could be more flexible.
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.8-dev
Hardware: PC Windows Vista
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-09 16:29 UTC by Jim Talbut
Modified: 2011-12-16 10:01 UTC (History)
0 users



Attachments
Patch to make column width calculations a bit more useful. (13.37 KB, application/octet-stream)
2011-12-09 16:29 UTC, Jim Talbut
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Talbut 2011-12-09 16:29:09 UTC
Created attachment 28061 [details]
Patch to make column width calculations a bit more useful.

Headers rows in a sheet often contain titles that are expected to run over into subsequent columns, so I'd like to be able to ignore some rows at the start.
Measuring every single cell can be prohibitively expensive for large sheets, and typically the results are no better than can be obtained from the first few rows.

With the current level of privacy in SheetUtil it's awkward to make use of it.
It would be more useful if SheetUtil was refactored to have:
1. A new method that took first/last row index as parameters.
2. The bulk of getColumnWidth extracted to be getCellWidth so callers can use it any way they want.
Comment 1 Yegor Kozlov 2011-12-16 10:01:20 UTC
Applied in r1215079

Yegor