Minor bug in Excel importer: we forgot to update the max cell index.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@281 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-03-12 00:23:01 +00:00
parent e760750b57
commit 7e2667ab45
2 changed files with 3 additions and 1 deletions

View File

@ -155,6 +155,8 @@ public class ExcelImporter implements Importer {
if (skip <= 0 || rowsWithData > skip) { if (skip <= 0 || rowsWithData > skip) {
project.rows.add(newRow); project.rows.add(newRow);
project.columnModel.setMaxCellIndex(newRow.cells.size());
if (limit > 0 && project.rows.size() >= limit) { if (limit > 0 && project.rows.size() >= limit) {
break; break;
} }

View File

@ -62,7 +62,7 @@ public class TsvCsvImporter implements Importer {
if (skip <= 0 || rowsWithData > skip) { if (skip <= 0 || rowsWithData > skip) {
project.rows.add(row); project.rows.add(row);
project.columnModel.setMaxCellIndex(Math.max(project.columnModel.getMaxCellIndex(), row.cells.size())); project.columnModel.setMaxCellIndex(row.cells.size());
if (limit > 0 && project.rows.size() >= limit) { if (limit > 0 && project.rows.size() >= limit) {
break; break;