search

Home  >  Q&A  >  body text

phpexcel reader plug-in import data into the database problem

< /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

某草草某草草2782 days ago609

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 13:05:15

    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

    reply
    0
  • 某草草

    某草草2017-05-16 13:05:15

    Print$data->sheet[0]['rownumber s'], check the actual number of rows read by the code in excel

    reply
    0
  • Cancelreply