faizaltkl's avatar

Importing Excel File

I am using Laravel Maatwebsite Excel library to upload excel contents to table, in my excel i have 2 rows but the count gives 4 , i am unable to upload excel file contents, can anyone help me please

0 likes
6 replies
jaythanki's avatar

@FAIZALTKL check if any rows are not blank in your file. Try to create new file and do fresh upload again. i guess you are doing like this

$data = Excel::load($filename, function($reader) {})->get();
$totalRows = $data->count();
faizaltkl's avatar

Thanks you for your reply

yes i'm doing like this, in my excel i have only 2 rows but count return 4 with other 2 have all values null

faizaltkl's avatar

one more issues like i have rows with data, when i'm debugging the content using dd($data) some contents are null eventhough there is value in it

faizaltkl's avatar

thankyou jaythaki, it's fixed , it was issue in excel

Please or to participate in this conversation.