This new version enhances the last posted patch by making the code more robust. It correctly handles OpenDocument and Excel 5 & 8 files (in conjunction with Felipe's patch to the Excel 5 bin code) and any other supported types. It makes the code less dependent on the ordering of the supported types, requiring only that the enumerated types be in ascending order within formats sharing a common extension (e.g. .xls files of type sfExcel2 ... SfExcel8).
To add a new type, simply insert it into the enumeration and update the SPREADSHEET_EXTS array.