Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
BlueDragon Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 292
Product BlueDragon
Category General Info
Question Can I generate an Excel spreadsheet from BlueDragon?
Answer Yes, it's long been possible to generate Microsoft Excel files from CFML. Excel has a feature that allows an HTML table to be turned into a spreadsheet, so it's simply a matter of using CFML to produce the desired table, then using CFCONTENT to indicate that you're generating a file that should be processed as a spreadsheet. The spreadsheet will open either embedded in the browser or by opening Excel, as determined by the configuration of the user's machine.

Following is an example. Simply copy and paste the CFML below into a CFML page on your server to test, then change to suit your own needs.

(There are more lines than you see in the window below. Use Ctrl-A or your mouse to select all the code, then use Ctrl-C or right-click and choose "copy" to copy it to your clipboard to paste into a CFML page to test on your own server.)

And if you're interested in doing the same thing but without need to name each column (just want to dump all the columns in the CFQUERY), use this code instead to replace the table-generating tags at the very bottom of the example above:



   
company media information terms of use privacy policy contact us