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