Dale's suggestions works just fine and I have successfully used that
method several times in the past (both with and without styles)

I did however found something very interesting not too long ago about
how to create an Excel XML
I still haven't had the time to actually try it out and I have no idea
how to apply different styles but this is the basic format for the
Excel XML (including the CF Header/Content tags:

<cfheader name="Content-Disposition" value="inline;
filename=MaxExcelFile.xls">
<cfheader name="Expires" value="#Now()#">
<cfcontent type="application/vnd.ms-excel">

<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:o="urn:schemas-microsoft-com:office:office"
          xmlns:x="urn:schemas-microsoft-com:office:excel"
          xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
          xmlns:html="http://www.w3.org/TR/REC-html40";>
    <ss:Worksheet ss:Name="Max Worksheet">
    <ss:Table>
        <ss:Row>
            <ss:Cell>
                <ss:Data ss:Type="String">Header Title 1</ss:Data>
            </ss:Cell>
            <ss:Cell>
                <ss:Data ss:Type="String">Header Title 2</ss:Data>
            </ss:Cell>
            <ss:Cell>
                <ss:Data ss:Type="String">Header Title 3</ss:Data>
            </ss:Cell>
        </ss:Row>

        <ss:Row>
            <ss:Cell>
                <ss:Data ss:Type="String">Row 1 Col1 Value</ss:Data>
            </ss:Cell>
            <ss:Cell>
                <ss:Data ss:Type="String">Row 1 Col2 Value</ss:Data>
            </ss:Cell>
            <ss:Cell>
                <ss:Data ss:Type="String">Row 1 Col3 Value</ss:Data>
            </ss:Cell>
        </ss:Row>

        <ss:Row>
            <ss:Cell>
                <ss:Data ss:Type="String">Row 2 Col1 Value</ss:Data>
            </ss:Cell>
            <ss:Cell>
                <ss:Data ss:Type="String">Row 2 Col2 Value</ss:Data>
            </ss:Cell>
            <ss:Cell>
                <ss:Data ss:Type="String">Row 3 Col3 Value</ss:Data>
            </ss:Cell>
        </ss:Row>
    </ss:Table>
    </ss:Worksheet>
</Workbook>


The really cool thing about this (if it works) is that you could
generate multiple Excel Worksheets, something that wouldn't be possible
with the HTML-method.

Please let me know how it goes and if it works out.

/Max

p.s.
The source for this knowledge is from:
Tim Newton (MercuryFusion.com) and his QueryToSpreadSheetML CustomTag


Dale Fraser wrote:
> You can do html method and still download not view.
>
> If your interested in how, I can post more.
>
> Regards
> Dale Fraser
>
> http://dale.fraser.id.au
>
>
>
>
>
> -----Original Message-----
> From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
> Of Mike Kear
> Sent: Thursday, 14 September 2006 13:58 PM
> To: cfaussie@googlegroups.com
> Subject: [cfaussie] Re: Outputting to Excel - how to incorporate styles
>
>
> Thanks again Dale.   I dont want to out put a HTML page, i want to
> output a XLS worksheet- an excel spreadsheet, not a HTML
> representation of an excel spreadsheet.
>
> If i do a html page, it displays on the browser screen.  It doesnt
> download.  After all, the whole purpose of this functionality is to
> allow users to download as a spreadsheet  the data they're already
> seeing in the browser
>
> I sincerely appreciate your interest, Dale, but I dont think I've
> explained the task adequately enough perhaps.
>
> Cheers
> Mike Kear
> Windsor, NSW, Australia
> Adobe Certified Advanced ColdFusion Developer
> AFP Webworks
> http://afpwebworks.com
> ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
>
> On 9/14/06, Dale Fraser <[EMAIL PROTECTED]> wrote:
> >
> > And my third post about embedding the style was correct.
> >
> > <cfcontent type="application/vnd.ms-excel">
> > <html>
> >         <head>
> >                 <style>
> >                         .forMike { color:red; background:#00FF99; }
> >                 </style>
> >         </head>
> >
> >         <body>
> >                 <table>
> >                         <tr>
> >                                 <td class="forMike">Just Guessing!</td>
> >                         </tr>
> >                 </table>
> >         </body>
> > </html>
> >
> > I'm not sure what you tried, but it doesn't get much simpler than this.
> >
> > Regards
> > Dale Fraser
> >
> > http://dale.fraser.id.au
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of Mike Kear
> > Sent: Thursday, 14 September 2006 13:27 PM
> > To: cfaussie@googlegroups.com
> > Subject: [cfaussie] Re: Outputting to Excel - how to incorporate styles
> >
> >
> > Dale are you suggesting this based on what you have ACTUALLY done or
> > what you think ought to be the case?
> >
> > Because as I said in my original posting, there are quire a few things
> > I've tried without success.
> >
> > Cheers
> > Mike Kear
> > Windsor, NSW, Australia
> > Adobe Certified Advanced ColdFusion Developer
> > AFP Webworks
> > http://afpwebworks.com
> > ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month
> >
> >
> >
> > On 9/14/06, Dale Fraser <[EMAIL PROTECTED]> wrote:
> > >
> > > Just embed the style tag
> > >
> > > <style>
> > >         .myStyle color: #FFFF00;
> > > </style>
> > >
> > >
> > > Regards
> > > Dale Fraser
> > >
> > > http://dale.fraser.id.au
> > >
> >
> >
> >
> >
> > >
> >
> 
> 
> --


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to