How to read and validate csv input and the rows
public function execute() { $data = []; $file = $this->getRequest()->getFiles(‘refundcsv’); print_r($file);//display the input file name if (!isset($file)) { throw new MagentoFrameworkExceptionLocalizedException(__(‘Invalid file upload attempt.’)); } $data = $this->csv->getData($file); //throws error print_r($data); foreach ($csvData as $row => $data) { if ($row… Read More »How to read and validate csv input and the rows