XlsxWriter 3.1.2__tar.gz → 3.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/Changes +18 -0
- XlsxWriter-3.1.4/PKG-INFO +87 -0
- XlsxWriter-3.1.4/XlsxWriter.egg-info/PKG-INFO +87 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_datetime.py +2 -2
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/setup.py +1 -1
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/__init__.py +1 -1
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart.py +46 -8
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_pie.py +1 -1
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chartsheet.py +3 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/core.py +4 -4
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/packager.py +3 -1
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/shape.py +1 -1
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/table.py +12 -3
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/workbook.py +2 -2
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/worksheet.py +33 -18
- XlsxWriter-3.1.2/PKG-INFO +0 -87
- XlsxWriter-3.1.2/XlsxWriter.egg-info/PKG-INFO +0 -87
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/LICENSE.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/MANIFEST.in +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/README.rst +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/XlsxWriter.egg-info/SOURCES.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/XlsxWriter.egg-info/dependency_links.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/XlsxWriter.egg-info/top_level.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/docs/_static/basic.css +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/docs/_static/default.css +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/docs/_static/hello01.png +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/docs/_static/logo.png +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/docs/_static/pygments.css +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/docs/readme.html +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/array_formula.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/autofilter.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/autofilter_data.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/autofit.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/background.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/cell_indentation.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_area.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_bar.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_clustered.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_column.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_combined.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_data_labels.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_data_table.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_data_tools.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_date_axis.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_doughnut.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_gauge.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_gradient.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_line.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_pareto.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_pattern.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_pie.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_radar.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_scatter.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_secondary_axis.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_stock.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chart_styles.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/chartsheet.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/check_close.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/comments1.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/comments2.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/conditional_format.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/context_manager.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/data_validate.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/datetimes.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/defined_name.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/demo.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/diagonal_border.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/django_simple.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/doc_properties.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/dynamic_arrays.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/headers_footers.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/hello_world.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/hide_row_col.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/hide_sheet.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/http_server.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/hyperlink.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/ignore_errors.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/images.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/images_bytesio.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/inheritance1.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/inheritance2.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/lambda.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/macros.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/merge1.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/merge_rich_string.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/outline.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/outline_collapsed.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_autofilter.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_chart.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_chart_columns.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_chart_line.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_column_formats.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_conditional_format.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_header_format.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_multiple.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_percentage.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_positioning.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_simple.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/pandas_table.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/panes.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_chart.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_conditional_format.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_format_custom.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_format_default.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_multiple.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_positioning.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_simple.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_sparklines.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/polars_xlsxwriter.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/rich_strings.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/right_to_left.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/sparklines1.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/sparklines2.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/tab_colors.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/tables.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/text_indent.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/textbox.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/tutorial1.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/tutorial2.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/tutorial3.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/unicode.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/unicode_polish_utf8.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/unicode_polish_utf8.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/unicode_shift_jis.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/unicode_shift_jis.txt +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/user_types1.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/user_types2.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/user_types3.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/vbaProject.bin +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/vba_extract.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/watermark.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/examples/worksheet_protection.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/setup.cfg +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/app.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_area.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_bar.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_column.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_doughnut.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_line.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_radar.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_scatter.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/chart_stock.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/comments.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/contenttypes.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/custom.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/drawing.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/exceptions.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/format.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/metadata.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/relationships.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/sharedstrings.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/styles.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/theme.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/utility.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/vml.py +0 -0
- {XlsxWriter-3.1.2 → XlsxWriter-3.1.4}/xlsxwriter/xmlwriter.py +0 -0
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
Release 3.1.4 - September 18 2023
|
|
3
|
+
---------------------------------
|
|
4
|
+
|
|
5
|
+
* Added support for enabling the Excel "Show #N/A as an empty cell" chart option
|
|
6
|
+
via the ``chart.show_na_as_empty_cell()`` method.
|
|
7
|
+
|
|
8
|
+
:feature:`1008`.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Release 3.1.3 - September 8 2023
|
|
12
|
+
--------------------------------
|
|
13
|
+
|
|
14
|
+
* Added support for custom total formulas to worksheet tables.
|
|
15
|
+
|
|
16
|
+
:feature:`982`.
|
|
17
|
+
|
|
18
|
+
|
|
1
19
|
Release 3.1.2 - May 28 2023
|
|
2
20
|
---------------------------
|
|
3
21
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: XlsxWriter
|
|
3
|
+
Version: 3.1.4
|
|
4
|
+
Summary: A Python module for creating Excel XLSX files.
|
|
5
|
+
Home-page: https://github.com/jmcnamara/XlsxWriter
|
|
6
|
+
Author: John McNamara
|
|
7
|
+
Author-email: jmcnamara@cpan.org
|
|
8
|
+
License: BSD-2-Clause
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Requires-Python: >=3.6
|
|
20
|
+
License-File: LICENSE.txt
|
|
21
|
+
|
|
22
|
+
XlsxWriter
|
|
23
|
+
==========
|
|
24
|
+
|
|
25
|
+
**XlsxWriter** is a Python module for writing files in the Excel 2007+ XLSX
|
|
26
|
+
file format.
|
|
27
|
+
|
|
28
|
+
XlsxWriter can be used to write text, numbers, formulas and hyperlinks to
|
|
29
|
+
multiple worksheets and it supports features such as formatting and many more,
|
|
30
|
+
including:
|
|
31
|
+
|
|
32
|
+
* 100% compatible Excel XLSX files.
|
|
33
|
+
* Full formatting.
|
|
34
|
+
* Merged cells.
|
|
35
|
+
* Defined names.
|
|
36
|
+
* Charts.
|
|
37
|
+
* Autofilters.
|
|
38
|
+
* Data validation and drop down lists.
|
|
39
|
+
* Conditional formatting.
|
|
40
|
+
* Worksheet PNG/JPEG/GIF/BMP/WMF/EMF images.
|
|
41
|
+
* Rich multi-format strings.
|
|
42
|
+
* Cell comments.
|
|
43
|
+
* Integration with Pandas and Polars.
|
|
44
|
+
* Textboxes.
|
|
45
|
+
* Support for adding Macros.
|
|
46
|
+
* Memory optimization mode for writing large files.
|
|
47
|
+
|
|
48
|
+
It supports Python 3.4+ and PyPy3 and uses standard libraries only.
|
|
49
|
+
|
|
50
|
+
Here is a simple example:
|
|
51
|
+
|
|
52
|
+
.. code-block:: python
|
|
53
|
+
|
|
54
|
+
import xlsxwriter
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Create an new Excel file and add a worksheet.
|
|
58
|
+
workbook = xlsxwriter.Workbook('demo.xlsx')
|
|
59
|
+
worksheet = workbook.add_worksheet()
|
|
60
|
+
|
|
61
|
+
# Widen the first column to make the text clearer.
|
|
62
|
+
worksheet.set_column('A:A', 20)
|
|
63
|
+
|
|
64
|
+
# Add a bold format to use to highlight cells.
|
|
65
|
+
bold = workbook.add_format({'bold': True})
|
|
66
|
+
|
|
67
|
+
# Write some simple text.
|
|
68
|
+
worksheet.write('A1', 'Hello')
|
|
69
|
+
|
|
70
|
+
# Text with formatting.
|
|
71
|
+
worksheet.write('A2', 'World', bold)
|
|
72
|
+
|
|
73
|
+
# Write some numbers, with row/column notation.
|
|
74
|
+
worksheet.write(2, 0, 123)
|
|
75
|
+
worksheet.write(3, 0, 123.456)
|
|
76
|
+
|
|
77
|
+
# Insert an image.
|
|
78
|
+
worksheet.insert_image('B5', 'logo.png')
|
|
79
|
+
|
|
80
|
+
workbook.close()
|
|
81
|
+
|
|
82
|
+
.. image:: https://raw.github.com/jmcnamara/XlsxWriter/master/dev/docs/source/_images/demo.png
|
|
83
|
+
|
|
84
|
+
See the full documentation at: https://xlsxwriter.readthedocs.io
|
|
85
|
+
|
|
86
|
+
Release notes: https://xlsxwriter.readthedocs.io/changes.html
|
|
87
|
+
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: XlsxWriter
|
|
3
|
+
Version: 3.1.4
|
|
4
|
+
Summary: A Python module for creating Excel XLSX files.
|
|
5
|
+
Home-page: https://github.com/jmcnamara/XlsxWriter
|
|
6
|
+
Author: John McNamara
|
|
7
|
+
Author-email: jmcnamara@cpan.org
|
|
8
|
+
License: BSD-2-Clause
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Requires-Python: >=3.6
|
|
20
|
+
License-File: LICENSE.txt
|
|
21
|
+
|
|
22
|
+
XlsxWriter
|
|
23
|
+
==========
|
|
24
|
+
|
|
25
|
+
**XlsxWriter** is a Python module for writing files in the Excel 2007+ XLSX
|
|
26
|
+
file format.
|
|
27
|
+
|
|
28
|
+
XlsxWriter can be used to write text, numbers, formulas and hyperlinks to
|
|
29
|
+
multiple worksheets and it supports features such as formatting and many more,
|
|
30
|
+
including:
|
|
31
|
+
|
|
32
|
+
* 100% compatible Excel XLSX files.
|
|
33
|
+
* Full formatting.
|
|
34
|
+
* Merged cells.
|
|
35
|
+
* Defined names.
|
|
36
|
+
* Charts.
|
|
37
|
+
* Autofilters.
|
|
38
|
+
* Data validation and drop down lists.
|
|
39
|
+
* Conditional formatting.
|
|
40
|
+
* Worksheet PNG/JPEG/GIF/BMP/WMF/EMF images.
|
|
41
|
+
* Rich multi-format strings.
|
|
42
|
+
* Cell comments.
|
|
43
|
+
* Integration with Pandas and Polars.
|
|
44
|
+
* Textboxes.
|
|
45
|
+
* Support for adding Macros.
|
|
46
|
+
* Memory optimization mode for writing large files.
|
|
47
|
+
|
|
48
|
+
It supports Python 3.4+ and PyPy3 and uses standard libraries only.
|
|
49
|
+
|
|
50
|
+
Here is a simple example:
|
|
51
|
+
|
|
52
|
+
.. code-block:: python
|
|
53
|
+
|
|
54
|
+
import xlsxwriter
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Create an new Excel file and add a worksheet.
|
|
58
|
+
workbook = xlsxwriter.Workbook('demo.xlsx')
|
|
59
|
+
worksheet = workbook.add_worksheet()
|
|
60
|
+
|
|
61
|
+
# Widen the first column to make the text clearer.
|
|
62
|
+
worksheet.set_column('A:A', 20)
|
|
63
|
+
|
|
64
|
+
# Add a bold format to use to highlight cells.
|
|
65
|
+
bold = workbook.add_format({'bold': True})
|
|
66
|
+
|
|
67
|
+
# Write some simple text.
|
|
68
|
+
worksheet.write('A1', 'Hello')
|
|
69
|
+
|
|
70
|
+
# Text with formatting.
|
|
71
|
+
worksheet.write('A2', 'World', bold)
|
|
72
|
+
|
|
73
|
+
# Write some numbers, with row/column notation.
|
|
74
|
+
worksheet.write(2, 0, 123)
|
|
75
|
+
worksheet.write(3, 0, 123.456)
|
|
76
|
+
|
|
77
|
+
# Insert an image.
|
|
78
|
+
worksheet.insert_image('B5', 'logo.png')
|
|
79
|
+
|
|
80
|
+
workbook.close()
|
|
81
|
+
|
|
82
|
+
.. image:: https://raw.github.com/jmcnamara/XlsxWriter/master/dev/docs/source/_images/demo.png
|
|
83
|
+
|
|
84
|
+
See the full documentation at: https://xlsxwriter.readthedocs.io
|
|
85
|
+
|
|
86
|
+
Release notes: https://xlsxwriter.readthedocs.io/changes.html
|
|
87
|
+
|
|
@@ -42,8 +42,8 @@ writer = pd.ExcelWriter(
|
|
|
42
42
|
# Convert the dataframe to an XlsxWriter Excel object.
|
|
43
43
|
df.to_excel(writer, sheet_name="Sheet1")
|
|
44
44
|
|
|
45
|
-
# Get the xlsxwriter workbook and worksheet objects
|
|
46
|
-
# widths
|
|
45
|
+
# Get the xlsxwriter workbook and worksheet objects in order
|
|
46
|
+
# to set the column widths and make the dates clearer.
|
|
47
47
|
workbook = writer.book
|
|
48
48
|
worksheet = writer.sheets["Sheet1"]
|
|
49
49
|
|
|
@@ -68,7 +68,8 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
68
68
|
self.x2_axis = {}
|
|
69
69
|
self.chart_name = ""
|
|
70
70
|
self.show_blanks = "gap"
|
|
71
|
-
self.
|
|
71
|
+
self.show_na_as_empty = False
|
|
72
|
+
self.show_hidden = False
|
|
72
73
|
self.show_crosses = 1
|
|
73
74
|
self.width = 480
|
|
74
75
|
self.height = 288
|
|
@@ -427,17 +428,29 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
427
428
|
|
|
428
429
|
self.show_blanks = option
|
|
429
430
|
|
|
431
|
+
def show_na_as_empty_cell(self):
|
|
432
|
+
"""
|
|
433
|
+
Display ``#N/A`` on charts as blank/empty cells.
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
None.
|
|
437
|
+
|
|
438
|
+
Returns:
|
|
439
|
+
Nothing.
|
|
440
|
+
"""
|
|
441
|
+
self.show_na_as_empty = True
|
|
442
|
+
|
|
430
443
|
def show_hidden_data(self):
|
|
431
444
|
"""
|
|
432
445
|
Display data on charts from hidden rows or columns.
|
|
433
446
|
|
|
434
447
|
Args:
|
|
435
|
-
|
|
448
|
+
None.
|
|
436
449
|
|
|
437
450
|
Returns:
|
|
438
451
|
Nothing.
|
|
439
452
|
"""
|
|
440
|
-
self.show_hidden =
|
|
453
|
+
self.show_hidden = True
|
|
441
454
|
|
|
442
455
|
def set_size(self, options=None):
|
|
443
456
|
"""
|
|
@@ -836,7 +849,7 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
836
849
|
# Convert and list of row col values to a range formula.
|
|
837
850
|
|
|
838
851
|
# If it isn't an array ref it is probably a formula already.
|
|
839
|
-
if
|
|
852
|
+
if not isinstance(data, list):
|
|
840
853
|
# Check for unquoted sheetnames.
|
|
841
854
|
if data and " " in data and "'" not in data and self.warn_sheetname:
|
|
842
855
|
warn(
|
|
@@ -882,7 +895,7 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
882
895
|
|
|
883
896
|
# Check for strings that would evaluate to float like
|
|
884
897
|
# '1.1_1' of ' 1'.
|
|
885
|
-
if
|
|
898
|
+
if isinstance(token, str) and re.search("[_ ]", token):
|
|
886
899
|
# Assume entire data series is string data.
|
|
887
900
|
return "str"
|
|
888
901
|
|
|
@@ -1638,6 +1651,10 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
1638
1651
|
# Write the c:dispBlanksAs element.
|
|
1639
1652
|
self._write_disp_blanks_as()
|
|
1640
1653
|
|
|
1654
|
+
# Write the c:extLst element.
|
|
1655
|
+
if self.show_na_as_empty:
|
|
1656
|
+
self._write_c_ext_lst_display_na()
|
|
1657
|
+
|
|
1641
1658
|
self._xml_end_tag("c:chart")
|
|
1642
1659
|
|
|
1643
1660
|
def _write_disp_blanks_as(self):
|
|
@@ -1821,11 +1838,11 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
1821
1838
|
|
|
1822
1839
|
# Write the c:extLst element.
|
|
1823
1840
|
if series.get("inverted_color"):
|
|
1824
|
-
self.
|
|
1841
|
+
self._write_c_ext_lst_inverted_color(series["inverted_color"])
|
|
1825
1842
|
|
|
1826
1843
|
self._xml_end_tag("c:ser")
|
|
1827
1844
|
|
|
1828
|
-
def
|
|
1845
|
+
def _write_c_ext_lst_inverted_color(self, color):
|
|
1829
1846
|
# Write the <c:extLst> element for the inverted fill color.
|
|
1830
1847
|
|
|
1831
1848
|
uri = "{6F2FDCE9-48DA-4B69-8628-5D25D57E5C99}"
|
|
@@ -1850,6 +1867,27 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
1850
1867
|
self._xml_end_tag("c:ext")
|
|
1851
1868
|
self._xml_end_tag("c:extLst")
|
|
1852
1869
|
|
|
1870
|
+
def _write_c_ext_lst_display_na(self):
|
|
1871
|
+
# Write the <c:extLst> element for the display NA as empty cell option.
|
|
1872
|
+
|
|
1873
|
+
uri = "{56B9EC1D-385E-4148-901F-78D8002777C0}"
|
|
1874
|
+
xmlns_c_16 = "http://schemas.microsoft.com/office/drawing/2017/03/chart"
|
|
1875
|
+
|
|
1876
|
+
attributes1 = [
|
|
1877
|
+
("uri", uri),
|
|
1878
|
+
("xmlns:c16r3", xmlns_c_16),
|
|
1879
|
+
]
|
|
1880
|
+
|
|
1881
|
+
attributes2 = [("val", 1)]
|
|
1882
|
+
|
|
1883
|
+
self._xml_start_tag("c:extLst")
|
|
1884
|
+
self._xml_start_tag("c:ext", attributes1)
|
|
1885
|
+
self._xml_start_tag("c16r3:dataDisplayOptions16")
|
|
1886
|
+
self._xml_empty_tag("c16r3:dispNaAsBlank", attributes2)
|
|
1887
|
+
self._xml_end_tag("c16r3:dataDisplayOptions16")
|
|
1888
|
+
self._xml_end_tag("c:ext")
|
|
1889
|
+
self._xml_end_tag("c:extLst")
|
|
1890
|
+
|
|
1853
1891
|
def _write_idx(self, val):
|
|
1854
1892
|
# Write the <c:idx> element.
|
|
1855
1893
|
|
|
@@ -2772,7 +2810,7 @@ class Chart(xmlwriter.XMLwriter):
|
|
|
2772
2810
|
delete_series = []
|
|
2773
2811
|
overlay = 0
|
|
2774
2812
|
|
|
2775
|
-
if legend.get("delete_series") and
|
|
2813
|
+
if legend.get("delete_series") and isinstance(legend["delete_series"], list):
|
|
2776
2814
|
delete_series = legend["delete_series"]
|
|
2777
2815
|
|
|
2778
2816
|
if position.startswith("overlay_"):
|
|
@@ -145,7 +145,7 @@ class ChartPie(chart.Chart):
|
|
|
145
145
|
delete_series = []
|
|
146
146
|
overlay = 0
|
|
147
147
|
|
|
148
|
-
if legend.get("delete_series") and
|
|
148
|
+
if legend.get("delete_series") and isinstance(legend["delete_series"], list):
|
|
149
149
|
delete_series = legend["delete_series"]
|
|
150
150
|
|
|
151
151
|
if position.startswith("overlay_"):
|
|
@@ -138,6 +138,9 @@ class Chartsheet(worksheet.Worksheet):
|
|
|
138
138
|
# Write the drawing element.
|
|
139
139
|
self._write_drawings()
|
|
140
140
|
|
|
141
|
+
# Write the legacyDrawingHF element.
|
|
142
|
+
self._write_legacy_drawing_hf()
|
|
143
|
+
|
|
141
144
|
# Close the worksheet tag.
|
|
142
145
|
self._xml_end_tag("chartsheet")
|
|
143
146
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
#
|
|
8
8
|
|
|
9
9
|
# Standard packages.
|
|
10
|
-
from datetime import datetime
|
|
10
|
+
from datetime import datetime, timezone
|
|
11
11
|
|
|
12
12
|
# Package imports.
|
|
13
13
|
from . import xmlwriter
|
|
@@ -72,7 +72,7 @@ class Core(xmlwriter.XMLwriter):
|
|
|
72
72
|
def _datetime_to_iso8601_date(self, date):
|
|
73
73
|
# Convert to a ISO 8601 style "2010-01-01T00:00:00Z" date.
|
|
74
74
|
if not date:
|
|
75
|
-
date = datetime.
|
|
75
|
+
date = datetime.now(timezone.utc)
|
|
76
76
|
|
|
77
77
|
return date.strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
78
78
|
|
|
@@ -118,7 +118,7 @@ class Core(xmlwriter.XMLwriter):
|
|
|
118
118
|
|
|
119
119
|
def _write_dcterms_created(self):
|
|
120
120
|
# Write the <dcterms:created> element.
|
|
121
|
-
date = self.properties.get("created", datetime.
|
|
121
|
+
date = self.properties.get("created", datetime.now(timezone.utc))
|
|
122
122
|
|
|
123
123
|
xsi_type = "dcterms:W3CDTF"
|
|
124
124
|
|
|
@@ -135,7 +135,7 @@ class Core(xmlwriter.XMLwriter):
|
|
|
135
135
|
|
|
136
136
|
def _write_dcterms_modified(self):
|
|
137
137
|
# Write the <dcterms:modified> element.
|
|
138
|
-
date = self.properties.get("created", datetime.
|
|
138
|
+
date = self.properties.get("created", datetime.now(timezone.utc))
|
|
139
139
|
|
|
140
140
|
xsi_type = "dcterms:W3CDTF"
|
|
141
141
|
|
|
@@ -244,7 +244,7 @@ class Shape(object):
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
# Check the colors array exists and is valid.
|
|
247
|
-
if "colors" not in gradient or
|
|
247
|
+
if "colors" not in gradient or not isinstance(gradient["colors"], list):
|
|
248
248
|
warn("Gradient must include colors list")
|
|
249
249
|
return
|
|
250
250
|
|
|
@@ -148,11 +148,16 @@ class Table(xmlwriter.XMLwriter):
|
|
|
148
148
|
if "format" in col_data and col_data["format"] is not None:
|
|
149
149
|
attributes.append(("dataDxfId", col_data["format"]))
|
|
150
150
|
|
|
151
|
-
if col_data.get("formula"):
|
|
151
|
+
if col_data.get("formula") or col_data.get("custom_total"):
|
|
152
152
|
self._xml_start_tag("tableColumn", attributes)
|
|
153
153
|
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
if col_data.get("formula"):
|
|
155
|
+
# Write the calculatedColumnFormula element.
|
|
156
|
+
self._write_calculated_column_formula(col_data["formula"])
|
|
157
|
+
|
|
158
|
+
if col_data.get("custom_total"):
|
|
159
|
+
# Write the totalsRowFormula element.
|
|
160
|
+
self._write_totals_row_formula(col_data.get("custom_total"))
|
|
156
161
|
|
|
157
162
|
self._xml_end_tag("tableColumn")
|
|
158
163
|
else:
|
|
@@ -182,3 +187,7 @@ class Table(xmlwriter.XMLwriter):
|
|
|
182
187
|
def _write_calculated_column_formula(self, formula):
|
|
183
188
|
# Write the <calculatedColumnFormula> element.
|
|
184
189
|
self._xml_data_element("calculatedColumnFormula", formula)
|
|
190
|
+
|
|
191
|
+
def _write_totals_row_formula(self, formula):
|
|
192
|
+
# Write the <totalsRowFormula> element.
|
|
193
|
+
self._xml_data_element("totalsRowFormula", formula)
|
|
@@ -12,7 +12,7 @@ import operator
|
|
|
12
12
|
import os
|
|
13
13
|
import re
|
|
14
14
|
import time
|
|
15
|
-
from datetime import datetime
|
|
15
|
+
from datetime import datetime, timezone
|
|
16
16
|
from decimal import Decimal
|
|
17
17
|
from fractions import Fraction
|
|
18
18
|
from struct import unpack
|
|
@@ -121,7 +121,7 @@ class Workbook(xmlwriter.XMLwriter):
|
|
|
121
121
|
self.custom_colors = []
|
|
122
122
|
self.doc_properties = {}
|
|
123
123
|
self.custom_properties = []
|
|
124
|
-
self.createtime = datetime.
|
|
124
|
+
self.createtime = datetime.now(timezone.utc)
|
|
125
125
|
self.num_vml_files = 0
|
|
126
126
|
self.num_comment_files = 0
|
|
127
127
|
self.x_window = 240
|
|
@@ -2031,7 +2031,7 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
2031
2031
|
elif isinstance(cell.value, str):
|
|
2032
2032
|
length = xl_pixel_width(cell.value)
|
|
2033
2033
|
|
|
2034
|
-
elif
|
|
2034
|
+
elif isinstance(cell.value, bool):
|
|
2035
2035
|
if cell.value:
|
|
2036
2036
|
length = 31
|
|
2037
2037
|
else:
|
|
@@ -2615,7 +2615,7 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
2615
2615
|
return -2
|
|
2616
2616
|
|
|
2617
2617
|
# Check that the input list doesn't exceed the maximum length.
|
|
2618
|
-
if options["validate"] == "list" and
|
|
2618
|
+
if options["validate"] == "list" and isinstance(options["value"], list):
|
|
2619
2619
|
formula = self._csv_join(*options["value"])
|
|
2620
2620
|
if len(formula) > 255:
|
|
2621
2621
|
warn(
|
|
@@ -3342,6 +3342,7 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
3342
3342
|
"name": "Column" + str(col_id),
|
|
3343
3343
|
"total_string": "",
|
|
3344
3344
|
"total_function": "",
|
|
3345
|
+
"custom_total": "",
|
|
3345
3346
|
"total_value": 0,
|
|
3346
3347
|
"formula": "",
|
|
3347
3348
|
"format": None,
|
|
@@ -3394,23 +3395,37 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
3394
3395
|
# Handle the function for the total row.
|
|
3395
3396
|
if user_data.get("total_function"):
|
|
3396
3397
|
function = user_data["total_function"]
|
|
3397
|
-
|
|
3398
|
-
# Massage the function name.
|
|
3399
|
-
function = function.lower()
|
|
3400
|
-
function = function.replace("_", "")
|
|
3401
|
-
function = function.replace(" ", "")
|
|
3402
|
-
|
|
3403
|
-
if function == "countnums":
|
|
3398
|
+
if function == "count_nums":
|
|
3404
3399
|
function = "countNums"
|
|
3405
|
-
if function == "
|
|
3400
|
+
if function == "std_dev":
|
|
3406
3401
|
function = "stdDev"
|
|
3407
3402
|
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3403
|
+
subtotals = set(
|
|
3404
|
+
[
|
|
3405
|
+
"average",
|
|
3406
|
+
"countNums",
|
|
3407
|
+
"count",
|
|
3408
|
+
"max",
|
|
3409
|
+
"min",
|
|
3410
|
+
"stdDev",
|
|
3411
|
+
"sum",
|
|
3412
|
+
"var",
|
|
3413
|
+
]
|
|
3412
3414
|
)
|
|
3413
3415
|
|
|
3416
|
+
if function in subtotals:
|
|
3417
|
+
formula = self._table_function_to_formula(
|
|
3418
|
+
function, col_data["name"]
|
|
3419
|
+
)
|
|
3420
|
+
else:
|
|
3421
|
+
formula = function
|
|
3422
|
+
if formula.startswith("="):
|
|
3423
|
+
formula = formula.lstrip("=")
|
|
3424
|
+
col_data["custom_total"] = formula
|
|
3425
|
+
function = "custom"
|
|
3426
|
+
|
|
3427
|
+
col_data["total_function"] = function
|
|
3428
|
+
|
|
3414
3429
|
value = user_data.get("total_value", 0)
|
|
3415
3430
|
|
|
3416
3431
|
self._write_formula(last_row, col_num, formula, xformat, value)
|
|
@@ -3553,12 +3568,12 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
3553
3568
|
|
|
3554
3569
|
# We handle single location/range values or list of values.
|
|
3555
3570
|
if "location" in options:
|
|
3556
|
-
if
|
|
3571
|
+
if isinstance(options["location"], list):
|
|
3557
3572
|
sparkline["locations"] = options["location"]
|
|
3558
3573
|
else:
|
|
3559
3574
|
sparkline["locations"] = [options["location"]]
|
|
3560
3575
|
|
|
3561
|
-
if
|
|
3576
|
+
if isinstance(options["range"], list):
|
|
3562
3577
|
sparkline["ranges"] = options["range"]
|
|
3563
3578
|
else:
|
|
3564
3579
|
sparkline["ranges"] = [options["range"]]
|
|
@@ -6761,7 +6776,7 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
6761
6776
|
elif type_cell_name == "Formula":
|
|
6762
6777
|
# Write a formula. First check the formula value type.
|
|
6763
6778
|
value = cell.value
|
|
6764
|
-
if
|
|
6779
|
+
if isinstance(cell.value, bool):
|
|
6765
6780
|
attributes.append(("t", "b"))
|
|
6766
6781
|
if cell.value:
|
|
6767
6782
|
value = 1
|
|
@@ -7436,7 +7451,7 @@ class Worksheet(xmlwriter.XMLwriter):
|
|
|
7436
7451
|
def _write_formula_1(self, formula):
|
|
7437
7452
|
# Write the <formula1> element.
|
|
7438
7453
|
|
|
7439
|
-
if
|
|
7454
|
+
if isinstance(formula, list):
|
|
7440
7455
|
formula = self._csv_join(*formula)
|
|
7441
7456
|
formula = '"%s"' % formula
|
|
7442
7457
|
else:
|
XlsxWriter-3.1.2/PKG-INFO
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 1.2
|
|
2
|
-
Name: XlsxWriter
|
|
3
|
-
Version: 3.1.2
|
|
4
|
-
Summary: A Python module for creating Excel XLSX files.
|
|
5
|
-
Home-page: https://github.com/jmcnamara/XlsxWriter
|
|
6
|
-
Author: John McNamara
|
|
7
|
-
Author-email: jmcnamara@cpan.org
|
|
8
|
-
License: BSD-2-Clause
|
|
9
|
-
Description: XlsxWriter
|
|
10
|
-
==========
|
|
11
|
-
|
|
12
|
-
**XlsxWriter** is a Python module for writing files in the Excel 2007+ XLSX
|
|
13
|
-
file format.
|
|
14
|
-
|
|
15
|
-
XlsxWriter can be used to write text, numbers, formulas and hyperlinks to
|
|
16
|
-
multiple worksheets and it supports features such as formatting and many more,
|
|
17
|
-
including:
|
|
18
|
-
|
|
19
|
-
* 100% compatible Excel XLSX files.
|
|
20
|
-
* Full formatting.
|
|
21
|
-
* Merged cells.
|
|
22
|
-
* Defined names.
|
|
23
|
-
* Charts.
|
|
24
|
-
* Autofilters.
|
|
25
|
-
* Data validation and drop down lists.
|
|
26
|
-
* Conditional formatting.
|
|
27
|
-
* Worksheet PNG/JPEG/GIF/BMP/WMF/EMF images.
|
|
28
|
-
* Rich multi-format strings.
|
|
29
|
-
* Cell comments.
|
|
30
|
-
* Integration with Pandas and Polars.
|
|
31
|
-
* Textboxes.
|
|
32
|
-
* Support for adding Macros.
|
|
33
|
-
* Memory optimization mode for writing large files.
|
|
34
|
-
|
|
35
|
-
It supports Python 3.4+ and PyPy3 and uses standard libraries only.
|
|
36
|
-
|
|
37
|
-
Here is a simple example:
|
|
38
|
-
|
|
39
|
-
.. code-block:: python
|
|
40
|
-
|
|
41
|
-
import xlsxwriter
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
# Create an new Excel file and add a worksheet.
|
|
45
|
-
workbook = xlsxwriter.Workbook('demo.xlsx')
|
|
46
|
-
worksheet = workbook.add_worksheet()
|
|
47
|
-
|
|
48
|
-
# Widen the first column to make the text clearer.
|
|
49
|
-
worksheet.set_column('A:A', 20)
|
|
50
|
-
|
|
51
|
-
# Add a bold format to use to highlight cells.
|
|
52
|
-
bold = workbook.add_format({'bold': True})
|
|
53
|
-
|
|
54
|
-
# Write some simple text.
|
|
55
|
-
worksheet.write('A1', 'Hello')
|
|
56
|
-
|
|
57
|
-
# Text with formatting.
|
|
58
|
-
worksheet.write('A2', 'World', bold)
|
|
59
|
-
|
|
60
|
-
# Write some numbers, with row/column notation.
|
|
61
|
-
worksheet.write(2, 0, 123)
|
|
62
|
-
worksheet.write(3, 0, 123.456)
|
|
63
|
-
|
|
64
|
-
# Insert an image.
|
|
65
|
-
worksheet.insert_image('B5', 'logo.png')
|
|
66
|
-
|
|
67
|
-
workbook.close()
|
|
68
|
-
|
|
69
|
-
.. image:: https://raw.github.com/jmcnamara/XlsxWriter/master/dev/docs/source/_images/demo.png
|
|
70
|
-
|
|
71
|
-
See the full documentation at: https://xlsxwriter.readthedocs.io
|
|
72
|
-
|
|
73
|
-
Release notes: https://xlsxwriter.readthedocs.io/changes.html
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
Platform: UNKNOWN
|
|
77
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
78
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
79
|
-
Classifier: Programming Language :: Python
|
|
80
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
81
|
-
Classifier: Programming Language :: Python :: 3
|
|
82
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
83
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
84
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
85
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
86
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
87
|
-
Requires-Python: >=3.6
|