title: DataTable to Excel Word and PDF
body: <p>The code below show only 10 records because of my filters</p>
  
  <pre><code>m.getData = function (options, callback) {
  table = $('#auditTrailTable').DataTable();
  var info = table.page.info();
  options.RecordsToSkip = info.start;
      options.RecordsToTake = info.length;
  
      var data = table.ajax.params();
  
      options.SortDirection = data.order[0].dir;
      options.ColumnName = data.columns[data.order[0].column].data;
  
      var paramDTO = {
          param: options,
          searchValue: '',
          dateFrom: m.filterDateFrom(),
          dateTo: m.filterDateTo()
      };
      var url = '/AuditTrail/Find';
  
      knock.AjaxBlockElement(paramDTO, url, '', function (result) {
          if (result.Data != undefined) {
              callback(result);
          }
      });
  
  };
  </code></pre>
  
  <p>The code below is my function to export the current page shown to excel only</p>
  
  <pre><code> m.exportToExcel = function () {
      var oTable = $('#auditTrailTable').DataTable();
      $.fn.DataTable.Export.excel(oTable, {
          filename: 'AuditTrail_Export',
          title: 'WebSOA Audit Trail',
          message: '',
          header: ['Activity', 'Name', 'Username', 'Timestamp'],
          fields: ["Activity", "Name", "Username", "TimestampString"]
      });
  }
  ;
  </code></pre>
  
  <p>My target is to export all records that aren't shown to excel/pdf and word but I only want to show is the current page with 10 records. Meaning all records from Page 2 up to the last page will be exported.</p>