I am using View Data Export to export users in csv. I am using a page view. Fields, User Name, Email. Same fields in Data Export display type and filters.

enter image description here

In Data Export display, using Parent Sort Checked.

Here are the page and Data Export Display using same settings.

enter image description here

Data Export Display.

enter image description here

On Page Display I am showing 5 users, with full pager. On Data Export Display I am using 5 as well.

When I change page, goto next page on /export-user, CSV Icon cant export users other than first 5 no matter on which page I am.

enter image description here

So the csv Icon shows the same link on each page.

Any idea if I am missing something.

  • Check your argument in url and pass the same in your export link. – Sumit Madan Apr 22 '15 at 13:38
  • I have tried, but no use. – Tanvir Ahmad Apr 22 '15 at 13:39
  • Have you set the same configuration in export view too?? – Sumit Madan Apr 23 '15 at 6:10
  • Yes same configuration in both views. – Tanvir Ahmad Apr 23 '15 at 7:10
  • Try to copy the link and paste it in browser url bar. – Sumit Madan Apr 23 '15 at 7:11

It seems issues with the module itself. You can just use view's template file or hook_views_pre_render() rather than attachment.

Append a link after views content or in footer called Export CSV.

Your code will be like this :

print l('Export CSV', 'userexport.csv', array('query' => array('page' => $_GET['page']));
  • It will not work, as I tried using userexport.csv?attach=page&page=1 in url with csv link, but generating the same file. So will be no use of this. – Tanvir Ahmad Apr 27 '15 at 12:25
  • Then I think the issue with the module itself. Ask in module's issue queue. – Sumit Madan Apr 27 '15 at 12:37

Here is a patch that worked for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.