0

I want to export the customer details as a CSV file. I have referred the below link for that:

https://magecomp.com/blog/export-data-csv-file-programmatically-magento-2/

I have put the code which is in the mentioned link to one of my custom module but where I have to check the controller output.

where the CSV file will be stored?

Any help will be appreciated!

8
  • Check inside var folder
    – Nayem323
    Dec 18, 2019 at 9:50
  • I can't see the CSV file inside var folder
    – Mohammad
    Dec 18, 2019 at 9:57
  • Please check controller response in browser console. Dec 18, 2019 at 10:01
  • Are you sure that your file generated successfully? And also you can give you custom folder path by editing $filePath = $this->directoryList->getPath(\Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR) . "/" . $fileName; this line
    – Nayem323
    Dec 18, 2019 at 10:01
  • @Nayem, I'm not sure whether the file is generated or not.
    – Mohammad
    Dec 18, 2019 at 10:04

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.

Browse other questions tagged or ask your own question.