The file I'm unable to read is an excel 2.1 file, which is really old. I figured that out after removing the extension, opening it in excel, then trying to save, and having Excel prompting if I want to save the 2.1 format or not. But POI as I understand does not support this, any easy way to make it support this format, since this format is still actively used by some carriers for sending invoices to their customers?
-----Original Message----- From: Nick Burch [mailto:[EMAIL PROTECTED] Sent: Friday, February 01, 2008 3:42 PM To: POI Users List Subject: Re: XLS files with no header On Thu, 31 Jan 2008, Marwan Gedeon wrote: > I'm running through constraints in the format of an Excel file I have at > hand, as it's being downloaded from a carrier directly. My application > needs to read the excel file as is without preopening in Excel, then convert > it to CSV. POI fails to open it with the error: > > java.io.IOException: Invalid header signature; read 4503629692403721, > expected -2226271756974174256 This error means that your file isn't a valid OLE2 document One thing you could try doing is saving the file, and looking at it. Perhaps it's not in excel format after all, but really something else? If it is an excel file, but without the normal OLE2 wrapper (rare and odd, but not un-heard of) you'll need to wrap it up as OLE2 before passing to HSSF. Check the list archives for the appropriate few lines of POIFS code to call. Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
