README.rst
1XlsxWriter
2==========
3
4**XlsxWriter** is a Python module for writing files in the Excel 2007+ XLSX
5file format.
6
7XlsxWriter can be used to write text, numbers, formulas and hyperlinks to
8multiple worksheets and it supports features such as formatting and many more,
9including:
10
11* 100% compatible Excel XLSX files.
12* Full formatting.
13* Merged cells.
14* Defined names.
15* Charts.
16* Autofilters.
17* Data validation and drop down lists.
18* Conditional formatting.
19* Worksheet PNG/JPEG/GIF/BMP/WMF/EMF images.
20* Rich multi-format strings.
21* Cell comments.
22* Integration with Pandas.
23* Textboxes.
24* Support for adding Macros.
25* Memory optimization mode for writing large files.
26
27It supports Python 2.7, 3.4+ and PyPy and uses standard libraries only.
28
29Here is a simple example:
30
31.. code-block:: python
32
33 import xlsxwriter
34
35
36 # Create an new Excel file and add a worksheet.
37 workbook = xlsxwriter.Workbook('demo.xlsx')
38 worksheet = workbook.add_worksheet()
39
40 # Widen the first column to make the text clearer.
41 worksheet.set_column('A:A', 20)
42
43 # Add a bold format to use to highlight cells.
44 bold = workbook.add_format({'bold': True})
45
46 # Write some simple text.
47 worksheet.write('A1', 'Hello')
48
49 # Text with formatting.
50 worksheet.write('A2', 'World', bold)
51
52 # Write some numbers, with row/column notation.
53 worksheet.write(2, 0, 123)
54 worksheet.write(3, 0, 123.456)
55
56 # Insert an image.
57 worksheet.insert_image('B5', 'logo.png')
58
59 workbook.close()
60
61.. image:: https://raw.github.com/jmcnamara/XlsxWriter/master/dev/docs/source/_images/demo.png
62
63See the full documentation at: https://xlsxwriter.readthedocs.io
64
65Release notes: https://xlsxwriter.readthedocs.io/changes.html
66
67