Sorry, I meant CFcontent in my header. I was able to get the header and footer
to appear using a style sheet. The odd thing now is that I have marked the
style sheet to orient the spreadsheet in landscape but when I try to print it
or print preview the file, it is in portrait. Here's my cfml and style sheet.
I've got XML in there as this page is coming over from ASP and it was in the
code over there.
<cfsetting enablecfoutputonly="Yes">
<cfset filename = "Fix_Report_#fileDate#.xls">
<cfcontent type="application/vnd.ms-excel">
<cfheader name="Content-Disposition" value="attachment;
filename=#trim(filename)#">
<cfoutput>
<HTML xmlns:x="urn:schemas-microsoft-com:office:excel">
<HEAD>
<style>
<!--
td
{
border-width: thin;
border-top-style:solid;
border-bottom-style:solid;
border-left-style:solid;
border-right-style:solid;
}
@page
{
mso-header-data:"&C&\0022Arial\,Bold\0022&12#trim(strHeader)#";
mso-footer-data:"&L \00A9 #DateFormat(Now(),'YYYY')#\, The TriZetto Group
&CPage &P of &N &RExported on\: &D &T";
mso-page-orientation:landscape;
margin:1in .5in .6in .5in;
}
br
{
mso-data-placement:same-cell;
mso-width-source:auto;
}
newclass
{
mso-width-source:auto;
}
-->
</style>
<!-- [if gte mso 9]><xml>
<x:ExcelWorkbook>
<x:ExcelWorksheets>
<x:ExcelWorksheet>
<x:Name>Change Packages</x:Name>
<x:WorksheetOptions>
<x:Print>
<x:ValidPrinterInfo/>
<x:VerticalResolution>600</x:VerticalResolution>
</x:Print>
<x:Selected/>
<x:Panes>
<x:Pane>
<x:Number>3</x:Number>
<x:ActiveCol>5</x:ActiveCol>
<x:RangeSelection>$A$1:$F$2</x:RangeSelection>
</x:Pane>
</x:Panes>
<x:ProtectContents>False</x:ProtectContents>
<x:ProtectObjects>False</x:ProtectObjects>
<x:ProtectScenarios>False</x:ProtectScenarios>
</x:WorksheetOptions>
</x:ExcelWorksheet>
</x:ExcelWorksheets>
<x:WindowHeight>10005</x:WindowHeight>
<x:WindowWidth>10005</x:WindowWidth>
<x:WindowTopX>120</x:WindowTopX>
<x:WindowTopY>135</x:WindowTopY>
<x:ProtectStructure>False</x:ProtectStructure>
<x:ProtectWindows>False</x:ProtectWindows>
</x:ExcelWorkbook>
<x:ExcelName>
<x:Name>Print_Titles</x:Name>
<x:SheetIndex>1</x:SheetIndex>
<x:Formula>=Recovered_Sheet1!$1:$2</x:Formula>
</x:ExcelName>
</xml><![endif] -->
</HEAD>
Jeff
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238952
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54