Home >Backend Development >PHP Tutorial >Is some data imported into phpexcel incorrect?
Why not everything is wrong, only some errors are found:
Excel looks like this
This is what it looks like after inserting into the database
There are more than a thousand pieces of data in total. No matter how I import it, there are always a few errors. What is the cause? Really weird.
Can anyone remind me? Thank you in advance~
Why not everything is wrong, only some errors are found:
Excel looks like this
This is what it looks like after inserting into the database
There are more than a thousand pieces of data in total. No matter how I import it, there are always a few errors. What is the cause? Really weird.
Can anyone remind me? Thank you in advance~
It has been solved. phpexcel itself uses "," to splice the read data
Change it to another splicing character and it will be normal, there will be no conflict
Thank you for the invitation. I guess there are invisible special characters or special formats in the data in your excel file. I would like to give you a suggestion: filter the corresponding data you want to store into the database by filtering special characters, such as line breaks, spaces, etc. For reference only
Is there a problem with recognizing the separator~ Commas are used as identifiers in CSV. It is recommended that you take a look at the source code to see how phpexcel is implemented.