empty cells with iterators

2007-04-03 Thread Hugo Osorio
Hello, How can i ask in the statement while(cellsIterator.hasNext()) AND (some cell is not empty) since this cell is my control for registering thank you

RE: empty cells with iterators

2007-04-03 Thread Karr, David
Perhaps you're looking to check whether the cell type is blank. Once you have a HSSFCell object, call getCellType() and compare it against HSSFCell.CELL_TYPE_BLANK. -Original Message- From: Hugo Osorio [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 03, 2007 8:50 AM To:

RE: Get column index by specifying Excel column index (i.e.C for col C)

2007-04-03 Thread Karr, David
You could give these a try. I didn't find this functionality in POI. private int colNameToNum(final String colName) { int result = 0; String lcColName = colName.toLowerCase(); for (int ctr = 0; ctr lcColName.length(); ++ ctr) result = (result *

RE: empty cells with iterators

2007-04-03 Thread Karr, David
How do you know the cell is blank? Because you're going by the row/column number you think you're looking at? Remember that the row/column numbers are 0-based, not 1-based. Because of issues like this, I like to have a dumpCellData method that goes through every row and column, printing out the

Auto fit of cell values in MS Excel

2007-04-03 Thread Anjishnu Bandyopadhyay
Hi all, I am generating an MS Excel sheet through POI. For a column in the sheet, I am specifying a width by using the method setColumnWidth(). Now, if the content of the cell is more, then, portions of the value in the cell are hidden. Is it possible to break the contents to the next line