DESCRIPTION.rst 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. |Travis|_ |Coveralls|_ |Docs|_ |PyPI|_
  2. .. |Travis| image:: https://api.travis-ci.org/python-excel/xlwt.svg?branch=master
  3. .. _Travis: https://travis-ci.org/python-excel/xlwt
  4. .. |Coveralls| image:: https://coveralls.io/repos/python-excel/xlwt/badge.svg?branch=master
  5. .. _Coveralls: https://coveralls.io/r/python-excel/xlwt?branch=master
  6. .. |Docs| image:: https://readthedocs.org/projects/xlwt/badge/?version=latest
  7. .. _Docs: https://xlwt.readthedocs.org/en/latest/
  8. .. |PyPI| image:: https://badge.fury.io/py/xlwt.svg
  9. .. _PyPI: https://badge.fury.io/py/xlwt
  10. xlwt
  11. ====
  12. This is a library for developers to use to generate
  13. spreadsheet files compatible with Microsoft Excel versions 95 to 2003.
  14. The package itself is pure Python with no dependencies on modules or packages
  15. outside the standard Python distribution.
  16. Please read this before using this package:
  17. https://groups.google.com/d/msg/python-excel/P6TjJgFVjMI/g8d0eWxTBQAJ
  18. Installation
  19. ============
  20. Do the following in your virtualenv::
  21. pip install xlwt
  22. Quick start
  23. ===========
  24. .. code-block:: python
  25. import xlwt
  26. from datetime import datetime
  27. style0 = xlwt.easyxf('font: name Times New Roman, color-index red, bold on',
  28. num_format_str='#,##0.00')
  29. style1 = xlwt.easyxf(num_format_str='D-MMM-YY')
  30. wb = xlwt.Workbook()
  31. ws = wb.add_sheet('A Test Sheet')
  32. ws.write(0, 0, 1234.56, style0)
  33. ws.write(1, 0, datetime.now(), style1)
  34. ws.write(2, 0, 1)
  35. ws.write(2, 1, 1)
  36. ws.write(2, 2, xlwt.Formula("A3+B3"))
  37. wb.save('example.xls')
  38. Documentation
  39. =============
  40. Documentation can be found in the ``docs`` directory of the xlwt package.
  41. If these aren't sufficient, please consult the code in the
  42. examples directory and the source code itself.
  43. The latest documentation can also be found at:
  44. https://xlwt.readthedocs.org/en/latest/
  45. Problems?
  46. =========
  47. Try the following in this order:
  48. - Read the source
  49. - Ask a question on https://groups.google.com/group/python-excel/
  50. Acknowledgements
  51. ================
  52. xlwt is a fork of the pyExcelerator package, which was developed by
  53. Roman V. Kiseliov. This product includes software developed by
  54. Roman V. Kiseliov <roman@kiseliov.ru>.
  55. xlwt uses ANTLR v 2.7.7 to generate its formula compiler.