Minor updates to documentation
This commit is contained in:
parent
4a67f086a1
commit
467dc6e80e
|
@ -21,10 +21,10 @@ Installation is quite easy: copy the contents of the Classes folder to any locat
|
||||||
|
|
||||||
If your web root folder is /var/www/ you may want to create a subfolder called /var/www/Classes/ and copy the files into that folder so you end up with files:
|
If your web root folder is /var/www/ you may want to create a subfolder called /var/www/Classes/ and copy the files into that folder so you end up with files:
|
||||||
|
|
||||||
/var/www/Classes/PHPExcel.php
|
/var/www/Classes/PHPExcel.php
|
||||||
/var/www/Classes/PHPExcel/Calculation.php
|
/var/www/Classes/PHPExcel/Calculation.php
|
||||||
/var/www/Classes/PHPExcel/Cell.php
|
/var/www/Classes/PHPExcel/Cell.php
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
### Getting started
|
### Getting started
|
||||||
|
@ -32,9 +32,9 @@ If your web root folder is /var/www/ you may want to create a subfolder called /
|
||||||
A good way to get started is to run some of the tests included in the download.
|
A good way to get started is to run some of the tests included in the download.
|
||||||
Copy the "Examples" folder next to your "Classes" folder from above so you end up with:
|
Copy the "Examples" folder next to your "Classes" folder from above so you end up with:
|
||||||
|
|
||||||
/var/www/Examples/01simple.php
|
/var/www/Examples/01simple.php
|
||||||
/var/www/Examples/02types.php
|
/var/www/Examples/02types.php
|
||||||
...
|
...
|
||||||
|
|
||||||
Start running the tests by pointing your browser to the test scripts:
|
Start running the tests by pointing your browser to the test scripts:
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ At present, this only allows you to write Excel2007 files without the need for Z
|
||||||
|
|
||||||
##### Excel 2007 cannot open the file generated by PHPExcel_Writer_2007 on Windows
|
##### Excel 2007 cannot open the file generated by PHPExcel_Writer_2007 on Windows
|
||||||
|
|
||||||
*"Excel found unreadable content in '*.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."<EFBFBD>*
|
"Excel found unreadable content in '*.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."
|
||||||
|
|
||||||
Some older versions of the 5.2.x php_zip extension on Windows contain an error when creating ZIP files. The version that can be found on [http://snaps.php.net/win32/php5.2-win32-latest.zip][8] should work at all times.
|
Some older versions of the 5.2.x php_zip extension on Windows contain an error when creating ZIP files. The version that can be found on [http://snaps.php.net/win32/php5.2-win32-latest.zip][8] should work at all times.
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
### Schematical
|
### Schematical
|
||||||
|
|
||||||
![01-schematic.png](./images/01-schematic.png "")
|
![01-schematic.png](./images/01-schematic.png "Basic Architecture Schematic")
|
||||||
|
|
||||||
|
|
||||||
### Lazy Loader
|
### Lazy Loader
|
||||||
|
|
||||||
PHPExcel implements an autoloader or "lazy loader", which means that it is not necessary to include every file within PHPExcel. It is only necessary to include the initial PHPExcel class file, then the autoloader will include other class files as and when required, so only those files that are actually required by your script will be loaded into PHP memory. The main benefit of this is that it reduces the memory footprint of PHPExcel itself, so that it uses less PHP memory.
|
PHPExcel implements an autoloader or "lazy loader", which means that it is not necessary to include every file within PHPExcel. It is only necessary to include the initial PHPExcel class file, then the autoloader will include other class files as and when required, so only those files that are actually required by your script will be loaded into PHP memory. The main benefit of this is that it reduces the memory footprint of PHPExcel itself, so that it uses less PHP memory.
|
||||||
|
|
||||||
If your own scripts already define an autoload function, then this may be overwritten by the PHPExcel autoload function. For example, if you have:
|
If your own scripts already define an autoload function, then this may be overwritten by the PHPExcel autoload function. For example, if you have:
|
||||||
```php
|
```php
|
||||||
|
@ -42,11 +42,12 @@ On its own, PHPExcel does not provide the functionality to read from or write to
|
||||||
|
|
||||||
By default, the PHPExcel package provides some readers and writers, including one for the Open XML spreadsheet format (a.k.a. Excel 2007 file format). You are not limited to the default readers and writers, as you are free to implement the PHPExcel_Reader_IReader and PHPExcel_Writer_IWriter interface in a custom class.
|
By default, the PHPExcel package provides some readers and writers, including one for the Open XML spreadsheet format (a.k.a. Excel 2007 file format). You are not limited to the default readers and writers, as you are free to implement the PHPExcel_Reader_IReader and PHPExcel_Writer_IWriter interface in a custom class.
|
||||||
|
|
||||||
![02-readers-writers.png](./images/02-readers-writers.png "")
|
![02-readers-writers.png](./images/02-readers-writers.png "Readers/Writers")
|
||||||
|
|
||||||
### Fluent interfaces
|
### Fluent interfaces
|
||||||
|
|
||||||
PHPExcel supports fluent interfaces in most locations. This means that you can easily "chain"" calls to specific methods without requiring a new PHP statement. For example, take the following code:
|
PHPExcel supports fluent interfaces in most locations. This means that you can easily "chain" calls to specific methods without requiring a new PHP statement. For example, take the following code:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw");
|
$objPHPExcel->getProperties()->setCreator("Maarten Balliauw");
|
||||||
$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw");
|
$objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw");
|
||||||
|
@ -56,7 +57,9 @@ $objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLS
|
||||||
$objPHPExcel->getProperties()->setKeywords("office 2007 openxml php");
|
$objPHPExcel->getProperties()->setKeywords("office 2007 openxml php");
|
||||||
$objPHPExcel->getProperties()->setCategory("Test result file");
|
$objPHPExcel->getProperties()->setCategory("Test result file");
|
||||||
```
|
```
|
||||||
|
|
||||||
This can be rewritten as:
|
This can be rewritten as:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
$objPHPExcel->getProperties()
|
$objPHPExcel->getProperties()
|
||||||
->setCreator("Maarten Balliauw")
|
->setCreator("Maarten Balliauw")
|
||||||
|
|
Loading…
Reference in New Issue