I have custom module in which i am importing csv file upon button click. I want to import the csv during module installation, i don't know how to implement it in install data file.

Any help will be appreciated.

1 Answer 1


You can find examples of import CSV files during installation on Magento 2 Sample data module https://github.com/magento/magento2-sample-data/blob/2.3-develop/app/code/Magento/CatalogSampleData/Setup/Installer.php

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.