The following should get you started:
var listViewWidget = dijit.registry.byNode(document.querySelector('.mx-name-listView1'));
If you have custom list view information, to get filtered data and export to excel you can call Nanoflow from the page and collect in string attribute selected filters(Export to Excel button to call nanoflow).
So after you returned constraint from the page, you can call microflow from nanoflow and get information from database by custom Java action with two input parameters.(Entity and JS Constraint)
But of course now with Mendix version 9, easy way would be to use datagrid 2.