title: DataTables automatically set export title
body: <p>I got the following .js file which is called on each page of my website and automatically transforms tables to DataTables:</p>
  
  <pre><code>$.extend( $.fn.dataTable.defaults, {
      "buttons": [
          $.extend( true, {}, buttonCommon, {
              extend: 'excelHtml5',
              exportOptions: {
                  columns: ':visible'
              }
          } ),
          $.extend( true, {}, buttonCommon, {
              extend: 'pdfHtml5',
              orientation: 'landscape',
              exportOptions: {
                  columns: ':visible'
              }
          } ),
          $.extend( true, {}, buttonCommon, {
              extend: 'print',
              exportOptions: {
                  columns: ':visible'
              },
              orientation: 'landscape'
          } )
      ]
  } );
  
  //Render datatables
  $(document).ready(function() {
      if ($('.data-table').length !== 0)
      {
          $('.data-table').DataTable();
      }
  });
  </code></pre>
  
  <p>When I export a table (i.e. excelHtml5, pdfHtml5 or print), I want the exported document's title to display the table's <strong>data-exporttitle</strong> attribute if the table has such attribute, or else display a default value. Currently and by default, the title displays the page header title.</p>
  
  <p>How can the above script be modified in order to achieve this?</p>
  
  <p>If this info is of any help, some pages on my website contain more than one table.</p>
  
  <p>My first reflex was to add the following "title" line of code in each extend function, but it doesn't work:</p>
  
  <pre><code>$.extend( true, {}, buttonCommon, {
      extend: 'pdfHtml5',
      orientation: 'landscape',
      title: $(this).data("export-title")
  } ),
  </code></pre>