Revision 892efc69
Added by Andreas Kohlbecker almost 14 years ago
cdmlib-commons/src/main/java/eu/etaxonomy/cdm/common/ExcelUtils.java | ||
---|---|---|
52 | 52 |
// This trick ensures that we get the data properly even if it doesn't start from first few rows |
53 | 53 |
for(int i = 0; i < 10 || i < rows; i++) { |
54 | 54 |
row = sheet.getRow(i); |
55 |
|
|
56 |
|
|
55 | 57 |
if(row != null) { |
56 | 58 |
tmp = sheet.getRow(i).getPhysicalNumberOfCells(); |
57 | 59 |
if(tmp > cols) cols = tmp; |
... | ... | |
72 | 74 |
for(int r = 1; r < rows; r++) { |
73 | 75 |
row = sheet.getRow(r); |
74 | 76 |
headers = new HashMap<String, String>(); |
75 |
if(row != null) { |
|
77 |
boolean notEmpty = false; |
|
78 |
for (int j = 0; j<row.getRowNum(); j++){ |
|
79 |
if (row.getCell(j) != null){ |
|
80 |
notEmpty = true; |
|
81 |
break; |
|
82 |
} |
|
83 |
} |
|
84 |
if(row != null && notEmpty) { |
|
76 | 85 |
for(int c = 0; c < cols; c++) { |
77 | 86 |
cell = row.getCell((short)c); |
78 | 87 |
if(cell != null) { |
Also available in: Unified diff
merging /branches/cdmlib/SPRINT-Chichorieae1/ to trunk