ODBiC Discussion Board

RE: creating .xls files online, Tony Klett, 10-20-2003

use output command

by Kuo-Tung Hsu, October 23, 2003 21:51

I remember I have posted this method before. Here it is again:

<!--DATABSE DSN=Demo --> <!--SET num = RAND(10000) + 1 --> <!--SELECT item1, item2 FROM demotable --> <!--OUTPUT $PATH_TRANSLATED_DIR$\name$num$.xls INSERT --> Item1Title item2title <!--OUTPUT --> <!--EACHROW --> <!--OUTPUT $PATH_TRANSLATED_DIR$\name$num$.xls APPEND --> $item1$ $item2$ <!--OUTPUT --> <!--ENDROW --> <A HREF="name$num$.xls">Download Excel File</A>

That's it. The most important thing is to use the TAB (NOT a space) between Item1Title and item2title (also between $item1$ and $item2$). I personally like to add raddom number into the file name because i find out if two users download the excel file at the same time, it will create the problem.

Any question, please send me the e-mail



Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 

Copyright ©1997-2003, Roger Harris. All rights reserved.