Browse Source

Merge 9b03fe431d into aae9c61ab6

pull/3833/merge
Tooi6 5 months ago committed by GitHub
parent
commit
ddcd6b7759
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      easyexcel-core/src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java

5
easyexcel-core/src/main/java/com/alibaba/excel/metadata/csv/CsvSheet.java

@ -138,9 +138,12 @@ public class CsvSheet implements Sheet, Closeable {
@Override
public Row getRow(int rownum) {
if (rowCache == null) {
return null;
}
int actualRowIndex = rownum - (lastRowIndex - rowCache.size()) - 1;
if (actualRowIndex < 0 || actualRowIndex > rowCache.size() - 1) {
throw new UnsupportedOperationException("The current data does not exist or has been flushed to disk\n.");
return null;
}
return rowCache.get(actualRowIndex);
}

Loading…
Cancel
Save