title: JqGrid: Choose columns for export with ExcelExport?
body: <p>I'm using jqgrid to show the contents of a database filled with (university) course evaluations. It consists of about 20-25 columns and 30k rows.</p>
  
  <p>The purpose of the webtool (jqgrid) is to be able to filter the data and export selected columns/rows to excel and to diagrams. So far I've managed to get the ExcelExport working (I'm using PHPExcel to actually create the xlsx-file though but not really relevant), however the data sent to the server doesn't include anything about which columns are visible - it does include the filters though so that's all good. I'm using column chooser and filtertoolbar to show selected data.</p>
  
  <p>Basically I want to send the colModel along with the filters sent to excelexport (and later on to google charts as well). I found this way of getting the colModel:</p>
  
  <pre><code>var colModel = $("#list").jqGrid('getGridParam','colModel');
  </code></pre>
  
  <p>This is how the excelexport function looks in the jqgrid source:</p>
  
  <pre><code>    excelExport : function(o) {
          o = $.extend({
              exptype : "remote",
              url : null,
              oper: "oper",
              tag: "excel",
              exportOptions : {}
          }, o || {});
          return this.each(function(){
              if(!this.grid) { return;}
              var url;
              if(o.exptype === "remote") {
                  var pdata = $.extend({},this.p.postData);
                  pdata[o.oper] = o.tag;
                  var params = jQuery.param(pdata);
                  if(o.url.indexOf("?") !== -1) { url = o.url+"&amp;"+params; }
                  else { url = o.url+"?"+params; }
                  window.location = url;
              }
          });
  </code></pre>
  
  <p>I've tried editing this but with no results (is it not possible to edit this function?) so then I though I would make my own ajax-call but I don't really know where to begin. How can I access the postData when writing my own call? Or is there a better way?</p>
  
  <p>Thank you!</p>