Copy link to clipboard
Copied
Hi,
i want to dump the records into excel report but wonder if i can display the header cloumns on every single page? For example, if i have 200 records and dump all into excel that have about 5 pages, how can i have the header colums to show header fields: Sale No , DeptNo, SaleDate, etct on all 5 pages?
<cfheader name="Content-Disposition" value="inline; filename=report.xls.xlsx">
<cfcontent type="application/vnd.ms-excel">
<table cellpadding="0" cellspacing="0" border="1" width="80%">
<tr>
<th width="7%"> Date</th>
<th width="5%">Sale</th>
<th width="5%">Dep.</th>
</tr>
<cfoutput query="variables.q_sale">
<tr>
<td >#orderDate#</td>
<td >#sale#</td>
<td >#dept#</td>
</tr>
</cfoutput>
</table>
</cfcontent>
if this option can't be done in excel, then I can used web instead. For web report, I display 200 records with the navagiation next and previous to go thru all 5 pages. I have the link for user to click on to print report in friendly format. On this page, it will displayed all 200 records on one page, but when they print, it will print 5 pages and i want the header fields displayed on all 5 pages.
Thanks
kt
Copy link to clipboard
Copied
For what you are trying to accomplish, you are probably better off using cfdocument to create pdf files.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more