Today I started using the JexcelApi and I bumped into this: When you try to get an element from a specific position, instead of using sheet.getCell(row,col) as you would normally expect, it is sheet.getCell(col,row).
So if you'd like to print your table you would have something like this:
for(int i=0;i<sheet.getRows();i++){
for(int j=0;j<sheet.getColumns();j++)
System.out.print(sheet.getCell(j,i).getContents()+" ");
System.out.println();
}
My question is why the [col,row] format? Is there a good reason why they used this instead of [row,col] as is ussualy used? Or there is no reason for this and they just went with this with no alternative reason? After using the r,c format for so much time this seems a little weird, but maybe it is more logical to use the c,r format and I just don't get why this is.
Any ideas?