口腔客户管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 4.5KB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # PhpSpreadsheet
  2. [![Build Status](https://github.com/PHPOffice/PhpSpreadsheet/workflows/main/badge.svg)](https://github.com/PHPOffice/PhpSpreadsheet/actions)
  3. [![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/?branch=master)
  4. [![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/PHPOffice/PhpSpreadsheet/?branch=master)
  5. [![Total Downloads](https://img.shields.io/packagist/dt/PHPOffice/PhpSpreadsheet)](https://packagist.org/packages/phpoffice/phpspreadsheet)
  6. [![Latest Stable Version](https://img.shields.io/github/v/release/PHPOffice/PhpSpreadsheet)](https://packagist.org/packages/phpoffice/phpspreadsheet)
  7. [![License](https://img.shields.io/github/license/PHPOffice/PhpSpreadsheet)](https://packagist.org/packages/phpoffice/phpspreadsheet)
  8. [![Join the chat at https://gitter.im/PHPOffice/PhpSpreadsheet](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PhpSpreadsheet)
  9. PhpSpreadsheet is a library written in pure PHP and offers a set of classes that
  10. allow you to read and write various spreadsheet file formats such as Excel and LibreOffice Calc.
  11. ## PHP version support
  12. LTS: Support for PHP versions will only be maintained for a period of six months beyond the
  13. [end of life of that PHP version](https://www.php.net/eol.php).
  14. Currently the required PHP minimum version is PHP __7.3__.
  15. See the `composer.json` for other requirements.
  16. ## Installation
  17. Use [composer](https://getcomposer.org) to install PhpSpreadsheet into your project:
  18. ```sh
  19. composer require phpoffice/phpspreadsheet
  20. ```
  21. If you are building your installation on a development machine that is on a different PHP version to the server where it will be deployed, or if your PHP CLI version is not the same as your run-time such as `php-fpm` or Apache's `mod_php`, then you might want to add the following to your `composer.json` before installing:
  22. ```json lines
  23. {
  24. "require": {
  25. "phpoffice/phpspreadsheet": "^1.23"
  26. },
  27. "config": {
  28. "platform": {
  29. "php": "7.3"
  30. }
  31. }
  32. }
  33. ```
  34. and then run
  35. ```sh
  36. composer install
  37. ```
  38. to ensure that the correct dependencies are retrieved to match your deployment environment.
  39. See [CLI vs Application run-time](https://php.watch/articles/composer-platform-check) for more details.
  40. ### Additional Installation Options
  41. If you want to write to PDF, or to include Charts when you write to HTML or PDF, then you will need to install additional libraries:
  42. #### PDF
  43. For PDF Generation, you can install any of the following, and then configure PhpSpreadsheet to indicate which library you are going to use:
  44. - mpdf/mpdf
  45. - dompdf/dompdf
  46. - tecnickcom/tcpdf
  47. and configure PhpSpreadsheet using:
  48. ```php
  49. // Dompdf, Mpdf or Tcpdf (as appropriate)
  50. $className = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class;
  51. IOFactory::registerWriter('Pdf', $className);
  52. ```
  53. or the appropriate PDF Writer wrapper for the library that you have chosen to install.
  54. #### Chart Export
  55. For Chart export, we support, which you will also need to install yourself
  56. - jpgraph/jpgraph
  57. and then configure PhpSpreadsheet using:
  58. ```php
  59. Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
  60. ```
  61. You can `composer/require` the github version of jpgraph, but this was abandoned at version 4.0; or manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/)
  62. ## Documentation
  63. Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).
  64. Please ask your support questions on [StackOverflow](https://stackoverflow.com/questions/tagged/phpspreadsheet), or have a quick chat on [Gitter](https://gitter.im/PHPOffice/PhpSpreadsheet).
  65. ## PHPExcel vs PhpSpreadsheet ?
  66. PhpSpreadsheet is the next version of PHPExcel. It breaks compatibility to dramatically improve the code base quality (namespaces, PSR compliance, use of latest PHP language features, etc.).
  67. Because all efforts have shifted to PhpSpreadsheet, PHPExcel will no longer be maintained. All contributions for PHPExcel, patches and new features, should target PhpSpreadsheet `master` branch.
  68. Do you need to migrate? There is [an automated tool](/docs/topics/migration-from-PHPExcel.md) for that.
  69. ## License
  70. PhpSpreadsheet is licensed under [MIT](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/LICENSE).