coldfusion - Add an attachment as zip in export to excel using cfspreadsheet -
i have cfspreadhsheet working fine downloading contents. have attachments records. when exporting export excel, want add zip file in new sheet. checked in docs, there function called spreadsheetaddimage
.
till now, doing , need add things here
<cfquery datasource="#request.dsn#" name="fetch"> select * mytable </cfquery> <cfset filename = "tickets" & dateformat(now(),'mm_dd_yyyy') & "." & "xls"> <cfset s = spreadsheetnew("summary")> <!--- add header row ---> <cfset spreadsheetaddrow(s, "id,date raised,summary,raised by,assignedto,status,last updated date, time spent, ticket type, last updated comment")> <!--- format header ---> <cfset spreadsheetformatrow(s,{bold=true,fgcolor="lemon_chiffon",fontsize=12,border=1},1)> <cfset spreadsheetaddrows(s, fetch)> <cfset spreadsheetformatcolumn(s,{textwrap=true},10)> <cfset spreadsheetwrite(s, filename, true)>
so looks decided use cfzip per suggestion , assist leigh in comments. sake of closure here in answer format.
coldfusion not allow embed files other images spreadsheet. if need package multiple file types together, using cfzip
best way handle requirement.
Comments
Post a Comment