worksheet.getNamedRanges() returns null for 2007 format

I am trialling the java cells new version (1.9.4)
I have a spreadsheet which is saved as both xls and xlsx

My code is identical except in opening the files where I use
workbook.open(‘resources/spreadsheets/DriverDebriefBase.xls’, FileFormatType.EXCEL2003)
workbook.open(‘resources/spreadsheets/DriverDebriefBase.xlsx’, FileFormatType.EXCEL2007)

respectively.

However, when I come to search in a worksheet for a NamedRange (that exists in both forms - it’s clearly visible from excel) it is found for the 2003 version but not found for the 2007 version.

It’s a worksheet range driverByDay!vehicle

When I check, the named ranges collection on the worksheet is null
worksheet.getNamedRanges() returns a null object on EXCEL2007

Is this a known problem?

I enclose the xslx and xsl files. In both cases there is a named range vehicle on the first sheet driverByDay at A2:A449




as a further note, if I just pass the spreadsheet straight through, the names are correctly written out.

Hi,

Please try this fix.

That fixes that problem. Thanks for the quick response, but see next problem …