in reply to Re^2: determine file type from data read from filehandle
in thread determine file type from data read from filehandle

I definitely see the point but for it to matter in fact you have to come up with a .txt or any other file type that will pass Excel parsing without error and return a workbook with content. That seems, to me, like a concern that can be safely punted to: "Failed to import foo.bar: because reasons..."