i solved the problem by inserting out.clearBuffer() :P
i realized that JSP Engine (ie. resin) inserts
a new line character due to the presence of page
directive at the top. i noticed this when i tried
downloading plain text file.
my code now appears :
out.clearBuffer();
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition",
"attachment; filename=\"" + fileName + ".xls" + "\"");
ServletOutputStream stream =
response.getOutputStream();
ts.writeExcelData(stream);
stream.close();
thx for the inputs guys :). sorry for my jsp but it
was just my own mini-project to generate my timesheet
:> (a 2-page jsp).
--- "Riley, Cameron" <[EMAIL PROTECTED]> wrote:
> ibo,
>
> Try setting the content length of the stream you
> are writing to the output
> stream in the response object.
>
>
>
response.setContentLength(bytearayoutputstream.size());
>
> In my case, I write a List of workbooks to a
> ZipOutputStream and return it
> as a ByteArrayOutputStream.
>
>
> Cameron Riley
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>