4

To export user data into a csv I've setup a view display of type data export succesfully. I've setup a path "admin/people/export" and when visiting it will return a file. The file is a csv file but it's created without the extension .csv.

Is there a way to create this file with this extension?

Thanks in advance

1 Answer 1

9

In the view settings click on Format: CSV File > Settings

screenshot

In the dialog box that appear, be sure that Provide as file is selected. In the Filename field that appears when that option is selected, leave the default value (%view.csv).

screenshot

%view, which adds the view machine name to the filename, is only one of the available replacement tokens. As visible in the screenshot, the other ones are:

  • %display
  • %exposed
  • %timestamp-full
  • %timestamp-yy
  • %timestamp-yyyy
  • %timestamp-mm
  • %timestamp-mmm
  • %timestamp-dd
  • %timestamp-ddd
  • %timestamp-hh
  • %timestamp-ii
  • %timestamp-ss
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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