phpexcel reader plug-in import data into the database problem
某草草2017-05-16 13:03:15
0
2
595
< /p>
< /p>
< /p>
Why is there an extra row of empty data every time I upload it? The database always has an extra row of empty data. Where should I handle it and how should I handle it? I've tried adjusting but can't solve it
It should be that when phpexcel reads it, it reads an empty row. Before splicing the SQL statement and executing the SQL, you should judge whether the field is empty. If every field in the entire row (or some required fields) If it is empty, continue
It should be that when phpexcel reads it, it reads an empty row. Before splicing the SQL statement and executing the SQL, you should judge whether the field is empty. If every field in the entire row (or some required fields) If it is empty, continue
Print
$data->sheet[0]['rownumber s']
, check the actual number of rows read by the code in excel