Hi Wayne,
Outputting Excel content is as simple as Jason describes, using an HTML
table.
To fix formatting problems, just write some special HTML extensions that
Excel understands.
Attached is a sample HTML file with some MS Office Extensions in HTML that
instructs Excel to not do the scientific formatting. See the HTML source for
details.
In addition to fixing the Credit Card format, my sample shows you how to
format a phone number mask and currency where you just supply the raw
numbers and Excel does the rest.
To see what I mean, save the attached HTML file to disk, then open it with
Excel (not MSIE).
Hope this is helpful....
Scott Cadillac
---------
Business Extranet Freedom
IExtranet ~ http://IExtranet.com
Online Demo ~ http://www.northwind.org/#demo
---------
Weblog ~ http://xmlx.ca
For Hire ~ http://xmlx.ca/forhire
---------
403-254-5002 ~ [EMAIL PROTECTED]
---------
P.O. Box 69006
RPO Bridlewood SW
Calgary, Alberta
Canada T2Y 4T9
> -----Original Message-----
> From: Wayne Irvine [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 31, 2005 7:10 PM
> To: [email protected]
> Subject: Re: Witango-Talk: Download to excel
>
> Roland Dumas at [EMAIL PROTECTED] wrote:
>
> > What's the format of the resultset that will cause each
> field to fall into a
> > column and for each row to fall into an excel row?
>
> I just write the ResultSet to a file with the extension
> '.xls' so it opens
> in Excel.
>
> There are some interesting issues with Excel though. If it
> sees a big number
> (like 16 digits, the size of a credit card number) it loves
> to assume they
> are numeric and writes them in scientific notation
> (1234123412341234 becomes
> 1.2341e+15) and MM/YY dates become MM/YY/<this year>. The
> best way to handle
> it is to have four fields for CC number and two for expiry
> and then parse
> the values before writing them
>
> Wayne
>
> Byte Services Pty Ltd
> http://www.byteserve.com.au/
> [EMAIL PROTECTED]
> Ph 02 9960 6099 Mob 0409 960 609 Fax 02 9960 6088
>
> ______________________________________________________________
> __________
> TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
>
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
| Listing_Title |
Product_ID |
Category |
Name |
User_Name |
Email |
Address |
City |
State |
Zip |
Phone |
CCNo |
ExprYr |
ExprMonth |
Bid |
Taxable |
First_Name |
Last_Name |
CardType |
| Some sample text |
1243 |
390 |
Jim Smith |
301977 |
[EMAIL PROTECTED] |
123 Any street |
Gaithersburg |
MD |
20877 |
3015551212 |
4111111111111110 |
2007 |
5 |
28700.50 |
No |
Jim |
Smith |
4 |
|
| Some other text to demonstrate this thing |
1255 |
393 |
Janet Smith |
301979 |
[EMAIL PROTECTED] |
123 Any Road |
Hope |
BC |
V3R 7U7 |
6049876543 |
4111128114113220 |
2007 |
9 |
5700.50 |
No |
Janet |
Smith |
4 |
|