title: How to remove column during export report in csv?
body: <p>I am using a jquery code to export a report in csv format.Everything working fine but I want to hide a column name column four from CSV.</p>
  
  <p>Here is my js code :</p>
  
  <pre><code>$(document).ready(function () {
  
  
  
      function exportTableToCSV($table, filename) {
  
  
  
          var $rows = $table.find('tr:has(td,th)'),
  
  
  
              // Temporary delimiter characters unlikely to be typed by keyboard
  
              // This is to avoid accidentally splitting the actual contents
  
              tmpColDelim = String.fromCharCode(11), // vertical tab character
  
              tmpRowDelim = String.fromCharCode(0), // null character
  
  
  
              // actual delimiter characters for CSV format
  
              colDelim = '","',
  
              rowDelim = '"\r\n"',
  
  
  
              // Grab text from table into CSV formatted string
  
              csv = '"' + $rows.map(function (i, row) {
  
                  var $row = $(row),
  
                      $cols = $row.find('td, th');
  
  
  
                  return $cols.map(function (j, col) {
  
                      var $col = $(col),
  
                          text = $col.text();
  
  
  
                      return text.replace('"', '""'); // escape double quotes
  
  
  
                  }).get().join(tmpColDelim);
  
  
  
              }).get().join(tmpRowDelim)
  
                  .split(tmpRowDelim).join(rowDelim)
  
                  .split(tmpColDelim).join(colDelim) + '"',
  
  
  
              // Data URI
  
              csvData = 'data:application/csv;charset=utf-8,' + encodeURIComponent(csv);
  
  
  
          $(this)
  
              .attr({
  
              'download': filename,
  
                  'href': csvData,
  
                  'target': '_blank'
  
          });
  
      }
  
  
  
      // This must be a hyperlink
  
      $(".export").on('click', function (event) {
  
          // CSV
  
          exportTableToCSV.apply(this, [$('#dvData&gt;table'), 'export.csv']);
  
  
  
          // IF CSV, don't do event.preventDefault() or return false
  
          // We actually need this to be a typical hyperlink
  
      });
  
  });
  </code></pre>
  
  <p>I am giving my working js fiddle below :</p>
  
  <p><a href="http://jsfiddle.net/KPEGU/925/" rel="nofollow">http://jsfiddle.net/KPEGU/925/</a></p>
  
  <p>Any idea?How to remove this column?</p>