Andrew C. Oliver 2007-03-02 03:13:13 +00:00
parent 89bfe86875
commit d26d6811fd

View File

@ -750,11 +750,14 @@ public class HSSFWorkbook
NameRecord r = null; NameRecord r = null;
while ((r = (NameRecord) workbook.findNextRecordBySid(NameRecord.sid, index)) != null) while ((r = (NameRecord) workbook.findNextRecordBySid(NameRecord.sid, index)) != null)
{ {
int nameRecordSheetIndex = workbook.getSheetIndexFromExternSheetIndex(r.getEqualsToIndexToSheet() - 1); int indexToSheet = r.getEqualsToIndexToSheet() -1;
if (isRowColHeaderRecord( r ) && nameRecordSheetIndex == sheetIndex) if(indexToSheet > -1) { //ignore "GLOBAL" name records
{ int nameRecordSheetIndex = workbook.getSheetIndexFromExternSheetIndex(indexToSheet);
return index; if (isRowColHeaderRecord( r ) && nameRecordSheetIndex == sheetIndex)
} {
return index;
}
}
index++; index++;
} }