title: How to export ui-grid to excel file?
body: <p>I use ui-grid in my project with angularjs. </p>
  
  <p>In my project ui-grid exports content to excel file and it's working perfectly.</p>
  
  <p>Here is ui-grid declaration: </p>
  
  <p></p>
  
  <p>and here ui-grid definition in javascript:</p>
  
  <pre><code> $scope.gridOptions = {
      columnDefs: [
        { field: 'name' },
        { field: 'company', cellFilter: 'mapCompany:this.grid.appScope.companyCatalog' }
      ],
      enableGridMenu: true,
      enableSelectAll: true,
      exporterCsvFilename: 'myFile.csv',
      exporterPdfDefaultStyle: {fontSize: 9},
      exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
      exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
      exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
      exporterPdfFooter: function ( currentPage, pageCount ) {
        return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
      },
      exporterPdfCustomFormatter: function ( docDefinition ) {
        docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
        docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; 
        return docDefinition;
      },
      exporterPdfOrientation: 'portrait',
      exporterPdfPageSize: 'LETTER',
      exporterPdfMaxGridWidth: 500,
      exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
  
      data : [      
        {
             "name": "Derek",
             "company": 423638
         },
        {
             "name": "Frederik",
             "company": 513560
         }                       
     ],
      onRegisterApi: function(gridApi){
        $scope.gridApi = gridApi;
      },
      gridMenuCustomItems: [
          {
              title:'Custom Export',
              action: function ($event) {
                // this.grid.api.exporter.csvExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL, true );
  
                var exportData = uiGridExporterService.getData(this.grid, uiGridExporterConstants.ALL, uiGridExporterConstants.ALL, true);
  
                var csvContent = uiGridExporterService.formatAsCsv([], exportData, this.grid.options.exporterCsvColumnSeparator);
  
                uiGridExporterService.downloadFile (this.grid.options.exporterCsvFilename, csvContent, this.grid.options.exporterOlderExcelCompatibility);        
              },
              order:0
          } 
      ]  
    };
  </code></pre>
  
  <p>Here is workin <a href="http://plnkr.co/edit/btiJb94V1GcMGQueAwPd?p=preview" rel="noreferrer">PLUNKER</a>!</p>
  
  <p>But I need to export content to RTL excel file.</p>
  
  <p>My question is how can I export ui-grid content to RTL excel file?  </p>