How to use PHP spreadsheet_excel_writer_php tutorial correctly

Source: Internet
Author: User
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:

  1. < ? PHP
  2. Call writer.php
  3. Require_once ' spreadsheet/excel/writer.php ';
  4. Create Workbook
  5. $ Workbook = New Spreadsheet_excel_writer ();
  6. Define export Excel file name
  7. $workbook- > send (' Test.xls ');
  8. create Worksheet
  9. $ worksheet =& $workbook- > Addworksheet (' My first worksheet ');
  10. Set Font size
  11. $ Format_column = & $workbook- > Addformat (Array (' Size ' =>9, ' Bold ' =>1));
  12. Data Write
  13. Header row (first row)
  14. $worksheet- > Write (0, 0, ' Name ', $format _column);
  15. $worksheet- > Write (0, 1, ' age ', $format _column);
  16. First person (second row)
  17. $worksheet- > Write (1, 0, ' John Smith ');
  18. $worksheet- > Write (1, 1, +);
  19. Second person (line three)
  20. $worksheet- > Write (2, 0, ' Johann Schmidt ');
  21. $worksheet- > Write (2, 1, to);
  22. A third person (line fourth)
  23. $worksheet- > write (3, 0, ' Juan Herrera ');
  24. $worksheet- > Write (3, 1, +);
  25. Close Workbook
  26. $workbook- > close ();
  27. ?>

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.