Data loss in excel database import (good or bad)

Source: Internet
Author: User
: This article mainly introduces the problem of data loss (when the excel file is imported into the database). If you are interested in the PHP Tutorial, please refer to it. Recently, the excel file import resume function has been developed. when importing an excel file, the data inserted into the database is often incomplete (only part of the data ), therefore, data in the obtained excel table is printed before insertion,

Rich text objects (consisting of unformatted text, control words, and control symbols, such as fonts in excel, including,, and so on) are printed ), this is the root cause of insertion failure.

Solution: type conversion to string

Before change:


After modification:

The problem has been solved. it is so simple that I hope it can help you!

The above introduces the problem of data loss (when the excel file is imported into the database, good or bad), including some content, hope to be helpful to friends who are interested in PHP tutorials.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.