DESCRIPTION.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. .. image:: https://coveralls.io/repos/bitbucket/openpyxl/openpyxl/badge.svg?branch=default
  2. :target: https://coveralls.io/bitbucket/openpyxl/openpyxl?branch=default
  3. :alt: coverage status
  4. Introduction
  5. ------------
  6. openpyxl is a Python library to read/write Excel 2010 xlsx/xlsm/xltx/xltm files.
  7. It was born from lack of existing library to read/write natively from Python
  8. the Office Open XML format.
  9. All kudos to the PHPExcel team as openpyxl was initially based on PHPExcel.
  10. Security
  11. --------
  12. By default openpyxl does not guard against quadratic blowup or billion laughs
  13. xml attacks. To guard against these attacks install defusedxml.
  14. Mailing List
  15. ------------
  16. The user list can be found on http://groups.google.com/group/openpyxl-users
  17. Sample code::
  18. from openpyxl import Workbook
  19. wb = Workbook()
  20. # grab the active worksheet
  21. ws = wb.active
  22. # Data can be assigned directly to cells
  23. ws['A1'] = 42
  24. # Rows can also be appended
  25. ws.append([1, 2, 3])
  26. # Python types will automatically be converted
  27. import datetime
  28. ws['A2'] = datetime.datetime.now()
  29. # Save the file
  30. wb.save("sample.xlsx")
  31. Documentation
  32. -------------
  33. The documentation is at: https://openpyxl.readthedocs.io
  34. * installation methods
  35. * code examples
  36. * instructions for contributing
  37. Release notes: https://openpyxl.readthedocs.io/en/stable/changes.html