Php reads the excel file, and the php package folder is a zip file,
1. download the file to your local computer and place it in the Apache environment.
2.d.xlsx is the server name and player list of a game. This program is only applicable to the xlsx file structure. For other structures, modify the index. php source code.
3.unzip zip.php is used to pack the generated files into files.zip.
4. access index. php to generate the files folder, where 0. js --- n. js stores the names of each server and server_name_list.js stores the server list.
5. Classes stores the functional module for php to read excel. The specific task logic is in index. php.
A. PHP excel reading support excel2007
Demo logic code: the (arrayRecursive, JSON method is the json data processing function, compatible with Chinese characters)
Mainly with: PHPExcel plug-in, the attachment has Classes folder, Official Website: http://www.codeplex.com/PHPExcel
Index. php
<? Php/** Error reporting */error_reporting (0); header ("Content-type: text/html; charset = UTF-8");?> <! Doctype html>
B. the PHP package folder is a zip file.
Zip. php
<? Php/** Error reporting */error_reporting (0); header ("Content-type: text/html; charset = UTF-8");?> <! Doctype html>
Download Code: php-read-excel
Http://files.cnblogs.com/zhidong123/php-read-excel.zip