tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Kofon" <pko...@hotmail.com>
Subject RE: Generate Excel File
Date Thu, 01 Jan 1970 00:00:00 GMT
Hi,
I've never done what you'd like to do. But if I remember correctly, the CSV 
text below will display correctly in Excel:

Item,Price
Doll,30
GameBoy,200

You'd have two rows and two columns (with headers Item and Price) of data. 
If the CSV data you're feeding Excel is not formatted like this, then 
chances are that you'd get wrong results - that explains why your single row 
of data isn't showing up correctly.

Regards,

Paul

>From: William Kaufman <WKaufman@viquity.com>
>Reply-To: tomcat-user@jakarta.apache.org
>To: "'tomcat-user@jakarta.apache.org'" <tomcat-user@jakarta.apache.org>
>Subject: RE: Generate Excel File
>Date: Wed, 18 Jul 2001 17:58:12 -0700
>
>We've got it working exactly as you say, but only if the data is delimited
>with _tabs_, not _commas_.
>
>                                         -- Bill K.
>
> > -----Original Message-----
> > From: Erin Lester [mailto:eclester@student.math.uwaterloo.ca]
> > Sent: Wednesday, July 18, 2001 2:21 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Generate Excel File
> >
> >
> > Hi, I'm trying to generate an excel file as the response
> > returned from a
> > servlet.  I have set the response's content type to
> > "application/vnd.ms-excel" and this seems to cause excel to open.  The
> > data I return is comma separated values.
> >
> > Once upon a time I read on a newsgroup (don't think it was
> > this one) that
> > someone had done the same thing and excel interpreted the
> > data as a csv
> > file and it displayed nicely in excel.  Unfortunately excel
> > seems to think
> > that the entire row of comma separated values that I'm
> > sending it is one
> > single cell (not a row of cells which are the values between
> > the commas).
> >
> > Can anyone tell me where I'm going wrong or of another way to
> > generate an
> > excel spreadsheet using JSP?
> >
> > Thanks!
> > Erin
> >


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


Mime
View raw message