0

I need to have all data from ui-grid for exporting it to excel.

I know it has already export function with all options like pdf, excel etc.

I have a requirement to export it from our side. for that I need to have all data visible right now on grid.

I am not able to find out how to take data from ui-grid. I have multiple grids that's why I am not able to get $scope.gridapi

suggest something on this

Ameya Deshpande
  • 3,580
  • 4
  • 30
  • 46

1 Answers1

1

I faced the similar situation. Lets assume we have two grids $scope.workflowGroup and $scope.workflowDetails.

you can get their data:

$scope.workflowGroup.data
$scope.workflowDetails.data

In case you need all the selected data,

$scope.filteredRows = $scope.gridApi.core.getVisibleRows($scope.gridApi.workflowGroup);

Hope this helps.

Debrup Majumdar
  • 74
  • 1
  • 10