How to Import CSV File to Custom Table In Magento 2
During the import of the product in Magento 2, some of the data or columns from the CSV file need to be imported to a custom table. So let’s crack up on the implementation to Import CSV file to Custom Table in Magento 2 🚀
Steps to Import CSV File to Custom Table in Magento 2:
Step 1: Create an import.xml file at the following path:
app/code/Vendor/Extension/etc
Step 2: Create file CustomImport.php under app/code/Vendor/Extension/Model/Import folder and add the following code:
Step 3: Create validator interface file RowValidatorInterface.php under app/code/Vendor/Extension/Model/Import/CustomImport folder and add the below code
for more details: https://magecomp.com/blog/import-csv-file-to-custom-table-magento-2/