cfquery to excel only outputs 1 record

Here is my code to send my query to the excel file but only one shows up?

<cfquery name="qryAccessData"
         datasource="NSKInfo">
             SELECT     a.systemName, a.systemNumber, a.numberofcpu, a.numberofio, a.ORG, a.division, b.director, a.type, a.comment, a.disposition, a.location, a.dateleftbldg, a.rmano, a.redeploy, a.lightson, a.footprint, a.srdate, a.srby, a.onallcount
FROM         dbo.NSKSystemInfo a INNER JOIN dbo.director b ON a.director_id = b.director_ID
WHERE     (a.onallcount = 'Yes')
order by a.systemname

</cfquery>

<!--- <CFOUTPUT><h1>#holder#</h1></CFOUTPUT>  --->
<br>



      <cfoutput query="qryAccessData">
<cfheader name="content-disposition" value="attachment;filename=allsyscountDump.xls">
<cfcontent type="application/vnd.ms-excel">
<table border="1">
     <tr>
          <th>System Name</th>
          <th>Sys/Order Number</th>
          <th>Number of CPU</th>
          <th>Number of IO</th>
          <th>Type</th>
          <th>Division</th>
          <th>Director</th>
          <th>ORG</th>
          <th>Comment</th>
          <th>Disposition</th>
          <th>Location</th>
          <th>Date Left Bldg</th>
          <th>RMA& Number</th>
          <th>Redeploy</th>
              <th>Lights ON/OFF</th>
          <th>Footprint</th>
          <th>SRDate</th>
              <th>SR BY</th>
     </tr>
     <tr>
          <td>#qryAccessData.systemName#</td>
          <td>#qryAccessData.systemNumber#</td>
          <td>#qryAccessData.numberofcpu#</td>
          <td>#qryAccessData.numberofio#</td>
          <td>#qryAccessData.type#</td>
          <td>#qryAccessData.division#</td>
              <td>#qryAccessData.director#</td>
          <td>#qryAccessData.ORG#</td>
          <td>#qryAccessData.comment#</td>
          <td>#qryAccessData.disposition#</td>
          <td>#qryAccessData.location#</td>
          <td>#qryAccessData.dateleftbldg#</td>
          <td>#qryAccessData.rmano#</td>
          <td>#qryAccessData.redeploy#</td>
          <td>#qryAccessData.lightson#</td>
          <td>#qryAccessData.footprint#</td>
          <td>#qryAccessData.srdate#</td>
          <td>#qryAccessData.srby#</td>
     </tr>
</table>
      </cfoutput>
LVL 1
lhaluskaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PluckaCommented:
lhaluska,

<cfheader name="content-disposition" value="attachment;filename=allsyscountDump.xls">
<cfcontent type="application/vnd.ms-excel">

Should be before  <cfoutput query="qryAccessData">

They way you have it you are outputting a headder after each row, thus only getting one row.

Regards
Plucka
0
JeffHowdenCommented:
Additionally, your <cfoutput query="qryAccessData"> needs to be between the header row and the data rows.

<cfheader name="content-disposition" value="attachment;filename=allsyscountDump.xls">
<cfcontent type="application/vnd.ms-excel">

<table border="1">
<thead>
     <tr>
          <th>System Name</th>
          <th>Sys/Order Number</th>
          <th>Number of CPU</th>
          <th>Number of IO</th>
          <th>Type</th>
          <th>Division</th>
          <th>Director</th>
          <th>ORG</th>
          <th>Comment</th>
          <th>Disposition</th>
          <th>Location</th>
          <th>Date Left Bldg</th>
          <th>RMA& Number</th>
          <th>Redeploy</th>
          <th>Lights ON/OFF</th>
          <th>Footprint</th>
          <th>SRDate</th>
          <th>SR BY</th>
     </tr>
</thead>
<tbody>
     <cfoutput query="qryAccessData">
     <tr>
          <td>#qryAccessData.systemName#</td>
          <td>#qryAccessData.systemNumber#</td>
          <td>#qryAccessData.numberofcpu#</td>
          <td>#qryAccessData.numberofio#</td>
          <td>#qryAccessData.type#</td>
          <td>#qryAccessData.division#</td>
          <td>#qryAccessData.director#</td>
          <td>#qryAccessData.ORG#</td>
          <td>#qryAccessData.comment#</td>
          <td>#qryAccessData.disposition#</td>
          <td>#qryAccessData.location#</td>
          <td>#qryAccessData.dateleftbldg#</td>
          <td>#qryAccessData.rmano#</td>
          <td>#qryAccessData.redeploy#</td>
          <td>#qryAccessData.lightson#</td>
          <td>#qryAccessData.footprint#</td>
          <td>#qryAccessData.srdate#</td>
          <td>#qryAccessData.srby#</td>
     </tr>
     </cfoutput>
</tbody>
</table>
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.