On 25/11/2011 22:10, Nick Burch wrote:
On Wed, 23 Nov 2011, Jim Talbut wrote:
Could I make a request for a small change to SheetUtil.getColumnWidth?
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*.

It'd probably make sense for an overloaded method that takes a range of rows numbers to check over (eg first and last)

If you're able to work this up, please open a new bug in bugzilla and post the patch!
OK, but before I do can you tell me the best way to iterate over a range of cells?
Should I:
1. Use a for loop over the numbers and ignore rows that aren't present.
2. Iterate over the rows collection, ignore rows before the start number and stop after the end number.
Is there any internal reason for preferring one over the other?

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to