My bad, sorry. On Fri, Feb 3, 2012 at 12:00 PM, Jim Talbut <jtal...@spudsoft.co.uk> wrote: > I already submitted a patch that did this for issue 52314. > getCellWidth should be in after r1215079. > > Check here before doing it again: > http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/SheetUtil.java?view=markup&pathrev=1215079 > > Jim > > > On 03/02/2012 07:27, Yegor Kozlov wrote: >> >> You are welcome to upload a patch for SheetUtil.getCellWidth(Workbook >> wb, Cell cell). >> >> In the javadoc you can describe your use case - where this ,method is >> used and when SheetUtil.getCellWidth is preferred over >> SheetUtil.getColumnWidth. >> >> Yegor >> >> On Thu, Feb 2, 2012 at 4:25 PM, Mike Halma<mike.ha...@proximity.co.uk> >> wrote: >>> >>> /"Strictly speaking, auto-sizing of columns cannot be supported in SXSSF >>> becasue >>> as Dave pointed, this API can only access rows within the sliding >>> window."/ >>> >>> True. However, this was a firm requirement for me. So I pinched the >>> code >>> from org.apache.poi.ss.util.SheetUtil.getColumnWidth() and created a >>> method >>> called getCellWidth(Workbook wb, Cell cell). I call this method for >>> every >>> cell I create and maintain an array of max cell size per column in much >>> the >>> same way as getColumnWidth() does - manually setting the column widths >>> once >>> all cells are created. >>> >>> So it might be an idea drop the unfortunately useless method >>> getColumnWidth >>> and replace it with a getCellWidth implementation? >>> >>> -- >>> View this message in context: >>> http://apache-poi.1045710.n5.nabble.com/DO-NOT-REPLY-Bug-51356-New-autoSizeColumn-in-SXSSF-Sheet-tp4477454p5450486.html >>> Sent from the POI - Dev mailing list archive at Nabble.com. >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org >>> For additional commands, e-mail: dev-h...@poi.apache.org >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org >> For additional commands, e-mail: dev-h...@poi.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org > For additional commands, e-mail: dev-h...@poi.apache.org >
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org