I checked that but it's in some type of binary format. 

-----Original Message-----
From: Tracey Zellmann [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 14, 2006 12:55 PM
To: POI Users List
Subject: Re: Can't read SQL server generated excel file

I have had some similar problems. I found that the sql server was sending the
file as a text file or an html file that excel was able to read. One clue is
if when you look at it in Excel, the file name is surrounded in quotes.
Another way to check is to try to open the file, exactly as it comes from
your customer, in a simple text program, like Notepad or TextPad. That let me
see what the characters really were. If the file looks like html or if it is
tab-delimited without any control characters, it is not a "true" 
Excel file.

In the end, I had to build a program to parse the text file into the data I
wanted.

----- Original Message -----
From: "Wennberg, Mathias" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, February 14, 2006 1:24 PM
Subject: Can't read SQL server generated excel file


We have a client that used to send us a manually created excel file (3
sheets, 3 columns each) that I was able to read without any problems.
However,  after they automated their process creating this excel file using
SQL Server 2000 DTS Package (Excel version 2000) I'm not able to read it.
I've tried both poi-2.5.1-final-20040804.jar and poi-2.0-final-20040126.jar.
Error thrown is "Unable to construct record instance, the following 
exception
occured: null". I get the same error on Windows 2000 and Linux.
Code that throws the error:
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(myFile));

I found that if I open this file on my workstation, resize a column and save
it, then I'm able to read it. This makes me believe that there is something
"special" about the sql server generated excel file but unfortunately I 
don't
have access to a sql server install so I can't play around with it.

Anyone know what's going on?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

Reply via email to