In the use
In fact, in many ways feel pear in the spreadsheet_excel_writer is very useful. The installation of PHP Spreadsheet_excel_writer is not described in this article.
The following is the contents of the PHP spreadsheet_excel_writer reference:
- < ? PHP
- Call writer.php
- Require_once ' spreadsheet/excel/writer.php ';
- Create Workbook
- $ Workbook = New Spreadsheet_excel_writer ();
- Define export Excel file name
- $workbook- > send (' Test.xls ');
- create Worksheet
- $ worksheet =& $workbook- > Addworksheet (' My first worksheet ');
- Set Font size
- $ Format_column = & $workbook- > Addformat (Array (' Size ' =>9, ' Bold ' =>1));
- Data Write
- Header row (first row)
- $worksheet- > Write (0, 0, ' Name ', $format _column);
- $worksheet- > Write (0, 1, ' age ', $format _column);
- First person (second row)
- $worksheet- > Write (1, 0, ' John Smith ');
- $worksheet- > Write (1, 1, +);
- Second person (line three)
- $worksheet- > Write (2, 0, ' Johann Schmidt ');
- $worksheet- > Write (2, 1, to);
- A third person (line fourth)
- $worksheet- > write (3, 0, ' Juan Herrera ');
- $worksheet- > Write (3, 1, +);
- Close Workbook
- $workbook- > close ();
- ?>
The above code example is the specific way to use PHP spreadsheet_excel_writer.
http://www.bkjia.com/PHPjc/446092.html www.bkjia.com true http://www.bkjia.com/PHPjc/446092.html techarticle In the use of many methods in fact feel pear in the spreadsheet_excel_writer is very useful. The installation of PHP Spreadsheet_excel_writer is not described in this article. The following is PHP spreadsheet_e ...