AndyJarrett

Getting stats from Soundings using cfspreadsheet

I'm hoping to post this over on soundings.riaforge.org later but I am having trouble with the site. Plus also thought good to throw out here.

Below I have hacked at the Sounding app by Ray (ColdFusion Jedi) Camdon to use cfspreadsheet to create the Excel stat sheet. All this code I have put in the IF block stating "form.format is 'excel'". It requires the query "getSurveyTakers" which should be just before it.

//Use an absolute path for the files. ---> theFile = expandPath( "report.xls" ); //Create empty ColdFusion spreadsheet objects. ---> theSheet = SpreadsheetNew("CourseData"); //Populate object with a query. ---> SpreadsheetAddRows(theSheet,reportQry);

There might be more efficient (read: quicker) ways of doing the above so always happy for feedback!