I am using ui-grid in my project with angular.
In my project, ui-grid exports the contents to an excel file and works fine.
Here is the ui-grid declaration:
and here is the definition of ui-grid in javascript:
$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) {
Here is the work of PLUNKER !
But I need to export the contents to an RTcel excel file.
My question is, how can I export the contents of the ui-grid to an excel RTL file?