I just wrote the following code and tested it and it works for me. I am currently using MS SQL instead of Oracle but the general idea is the same. <cfquery name="GetPeople" > SELECT TOP 10 Firstname+char(10)+Lastname as nm FROM person ORDER BY firstname,lastname </cfquery> <cfscript> fmtHeader = { font="Arial", fontsize="12", textwrap="true", bold="true", alignment="center", verticalalignment="vertical_bottom", topborder="thin", bottomborder="thin", leftborder="thin", rightborder="thin", fgcolor="light_cornflower_blue", color="black" }; sh = SpreadsheetNew("test", False); for (row=1;row<=GetUsers.recordcount;row++) { SpreadsheetSetCellValue(sh, GetPeople.nm[row], row, 1); SpreadsheetFormatCell(sh, fmtHeader, row, 1); } </cfscript> <cfset filename = "test.xls"> <cfspreadsheet action="write" filename="#expandpath('.')#/../TempFiles/#filename#" name="sh" overwrite="true"> <cfheader name="Content-Disposition" value="attachment; filename=""#filename#"""> <cfcontent type="application/vnd.ms-excel" deletefile="no" file="#expandpath('.')#\..\TempFiles\#filename#">
... View more