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 2003/04/28 10:59:08 UTC

DO NOT REPLY [Bug 9403] - HSSFRow.cellIterator() returns row results in reverse order

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9403>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9403

HSSFRow.cellIterator() returns row results in reverse order





------- Additional Comments From sean.geraty@qsuper.qld.gov.au  2003-04-28 08:59 -------
Hi,

I'm new to this, so please excuse me if I do anything incorrectly. I've voted 
for this to be changed because of the following:
-> While no contract to order exists, there is certainly a logical expectation 
of sequence because the HSSFSheet.rowIterator() does deliver its results 
ordered from low to high, so why not HSSFRow.cellIterator?
-> It appears easy to do - I got an ordered sequence by simply changing the 
HashMap cells to TreeMap (and removing the constructors initial capacity) in 
HSSFRow.java - only 3 lines. By the way, this will make it consistent with the 
TreeMap rows defined in HSSFSheet.java.

If the change is declined, perhaps a compromise method (e.g. 
HSSFRow.orderedCellIterator() - that converts the HashMap to a TreeMap?).

Cheers,
Sean