Andrew C. Oliver 2007-03-02 03:13:13 +00:00
parent 71e5ccf8e2
commit ffd6b3f8a0
1 changed files with 8 additions and 5 deletions

View File

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