1. Overview
PHP Excel Parser Pro is a file (excelparser.php), that works without database and additional modules like COM. You just need PHP installed on your web server. PHP Excel Parser Pro is not a complete program by itself, it is a PHP class. PHP Excel Parser Pro gets ALL DATA from the XLS file (Excel versions 5.0/97/2000/XP/2003) and creates an ARRAY. The outputs of data to DataBase (MySQL, Oracle, MSSQL), HTML, SCREEN and etc. depend only on your part of the program, in other words you’ll have to write a part of code according to your needs.
PHP Excel Parser Pro is distributed with two sample scripts: xls2mysql and xls2html. These sample plug-ins illustrate how PHP Excel Parser Pro reads Excel files and transports the information into MySQL Database or creates an HTML file.
PHP Excel Parser Pro is a cost-effective solution for web developers and PHP programmers. You can use it for new e-commerce application and e-catalogs publishing. You can construct website builders on PHP Excel Parser Pro basis.
3. Distributed PHP Excel Parser Pro package.
ExcelParser
Excel Parser is a PHP class that you can use for your development purposes and include it into your program. For the smooth and easy performance of PHP Excel Parser Pro the source code of excelparser.php is encrypted with Zend encoder. The scripts of xls2mysql and xls2html are not encoded as they are used as sample files.
Xls2mysql
For xls2mysql demonstration purposes there’s an Excel file [price.xls] which works with the mentioned plug-in. Further xls2mysql imports data extracted by PHP Excel Parser Pro from an Excel file into a MySQL database table.
There are no PHP programming skills required to create MySQL database from your Excel file.
Functions of xls2mysql script:
- determines tables structure and data import;
- the first row from an Excel table can be fields names for MySQL database table ;
- selective fields you wish to import and pre-defined field names and table name for MySQL database ;
- overwrite an existing MySQL table or continue to fill it with data from Excel files;
- Unicode support
Xls2html
Xls2html is a simple script that demonstrates how PHP Excel Parser Pro dumps all data from Excel files to HTML. This script is supplied with each trial version and is stored at the folder sample/xls2html.
As declared before Excel files with thousands of records are parsed correctly. However due to the interest of the developers to this issue we have to mention the following. The process of parsing large Excel files takes minutes depending on various factors ( hosting settings, the PHP version you use, PHP settings and your server’s speed of data processing ). As a result of parsing your browser has to display a HTML file and its size is several MB and it’s the browser that fails to show you the results of parsing. In such cases we recommend you to dump the data from Excel file to MySQL.
The sample output script i.e. /xls2html/ was created for demonstration purposes only. This demonstration file was not dedicated for output of large files to the browser. You can see that the Parser works correctly with your files if you use the other sample code /xls2mysql/ and you will see that all data are recorded to the MySQL database.
4. Troubleshooting
After being processed double precision float numbers (64 bit, IEEE754 ) are decoded with inaccuracy
At the current version of PHP Excel Parser custom cells format is not supported. PHP Excel Parser Pro doesn’t process linked Excel files. If you want to process such files please break links at your Excel files and then process it separately.
As PHP4.3.x and PHP.5.0.x have different methods for number processing we have released two versions of PHP Excel Parser Pro. Please be specific regarding PHP version you use at your server.
5. Large file processing
One of the advantages of this script is that the Parser can process large Excel files.
Under large Excel files we mean files which size is more than 1MB or records number is more than 5000. The processing of such files is a serious issue. However the work of PHP Excel Parser Pro depends on certain factors and the key one is your server’s settings. The Parser runtime depends on your hosting settings, on the PHP version you use, PHP settings and your server’s speed of data processing.
If you need to optimize the speed of performance which is possible in certain cases (e.g. when you do not use some cell formats) please contact our technical support team and we’ll release a custom version dedicated for your specific Excel files.