coldfusion - Styling a cfcontent which produced an excel sheet with an external stylesheet -


i trying incorporate stylesheet cfcontent tag produce excel spreadsheet shown below. however, stylesheet ignored when linked explicit reference. ensure excel spreadsheet incorporate stylesheet?

<cfsetting enablecfoutputonly="yes"> <cfsavecontent variable="stest">     <cfoutput>         <head>             <meta http-equiv="content-type" content="text/html; charset=utf-8" />               <link rel="stylesheet" type="text/css" href="www.somesite.com/bootstrap/another.css" media="all">             <link rel="stylesheet" type="text/css" href="../cssbootstrap/css/another.css" media="all">         </head>         <body>              <cfinclude template="../reports/reportexportedasexcel.cfm">         </body>     </cfoutput> </cfsavecontent> <cfcontent type="application/vnd.ms-excel"> <cfheader name="content-disposition" value="attachment; filename=filename#dateformat(now(),"mmdd")#-#timeformat(now(),"hhmmss")#.xls">   <cfoutput>     <html>           </head>     <body>         #stest#     </body>     </html> </cfoutput>  </cfcontent> 

include protocol in link style sheet. <link rel="stylesheet" type="text/css" href="http://www.somesite.com/bootstrap/another.css" media="all">

another option include style sheet content xls file.

<cfset cssfilepath = getdirectoryfrompath(gettemplatepath()) & "../cssbootstrap/css/another.css" /> <cfset csscontent = fileread(cssfilepath) /> </cfscript> <html>     <cfoutput>         <head>             <style>#csscontent#</style>         </head>     </cfoutput> 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -