title: jQuery Datatables: How do I extract the row header titls?
body: <p>EDIT: This only happens when I'm using sScrollX. -- <a href="http://jsfiddle.net/4n3Hp/" rel="nofollow">http://jsfiddle.net/4n3Hp/</a> -- Unfortunately, it's needed for this particular use case.</p>
  
  <p>As tabletools doesn't work for me, due to its use of flash and some suboptimal behaviors for my situation, i'm trying to write an excel export. I've extracted all of the necessary cell information, but DataTables is doing something weird with the header. </p>
  
  <p>Assuming a div of listTable (which is generic, but works for an example) I've tried</p>
  
  <pre><code>$('#listTable').dataTable().fnSettings().nTable.getElementsByTagName('thead')
  </code></pre>
  
  <p>which gets me the table header row, except it's been changed.</p>
  
  <pre><code>&lt;th class=​"sorting" role=​"columnheader" tabindex=​"0" 
  aria-controls=​"listTable" rowspan=​"1" colspan=​"1" 
  style=​"width:​ 130px;​ padding-top:​ 0px;​ padding-bottom:​ 0px;​ 
  border-top-width:​ 0px;​ border-bottom-width:​ 0px;​ height:​ 0px;​" 
  aria-label=​"Email Recipients:​ activate to sort column ascending"&gt;​&lt;/th&gt;​
  </code></pre>
  
  <p>Which would be fine, except the original header text has been removed, the exact thing I need.</p>
  
  <p>Looking at the DOM, it shows there being two actual tables, one of which has the cell data, and a new one encapsulated with a "datatables_scrollHeadInner" classed div. (If I have multiple tables on a page, this is problematic when providing a general solution.)</p>
  
  <p>While I think I have a hackaround solution (pull from the aria-label and separate by colon, and never use a colon in a header; or do some awkward jquery navigation), I'd like to know how I can more elegantly extract the headers from a dataTable. </p>