I would like to ask, how can I import and obtain data from nearly Excel tables with different styles?

Source: Internet
Author: User
There are hundreds of Excel tables with different styles. For each Excel table to be uploaded, except for the header, the data of uncertain rows is obtained. Is the code to be written different? Should I write different codes for each Excel table? Oh, by the way, there are not hundreds of Excel tables imported at the same time, with different styles. For each Excel table to be uploaded, except for the header, the data of uncertain rows is obtained. Is the code to be written different? Should I write different codes for each Excel table?

Oh, by the way, it's not imported at the same time...
(It seems like it's a bit difficult ...)

Reply content:

There are hundreds of Excel tables with different styles. For each Excel table to be uploaded, except for the header, the data of uncertain rows is obtained. Is the code to be written different? Should I write different codes for each Excel table?

Oh, by the way, it's not imported at the same time...
(It seems like it's a bit difficult ...)

PHPExcel only obtains content by row and column. If your content is not correct, you can make a dynamic operation. For example:
Load the excel content and list it .. Then, manually select which columns correspond to the data you need and then import the data ~~

Of course, certain specific fields can be automatically imported according to certain rules. For example, fields with specific characteristics such as phone numbers and names can all be judged through regular expressions.
Or fixed header content.

You can refer to the gui program import method to import the first line title first, manually specify which column corresponds to which field to execute the Import

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.