XlsxWriter 3.2.0__tar.gz → 3.2.2__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.2.0 → xlsxwriter-3.2.2}/Changes +41 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/LICENSE.txt +1 -1
- {XlsxWriter-3.2.0/XlsxWriter.egg-info → xlsxwriter-3.2.2}/PKG-INFO +17 -9
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/README.rst +6 -7
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2/XlsxWriter.egg-info}/PKG-INFO +17 -9
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/XlsxWriter.egg-info/SOURCES.txt +5 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/array_formula.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/autofilter.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/autofit.py +2 -1
- xlsxwriter-3.2.2/examples/autofit_manually.py +32 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/background.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/cell_indentation.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_area.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_bar.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_clustered.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_column.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_combined.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_data_labels.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_data_table.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_data_tools.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_date_axis.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_doughnut.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_gauge.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_gradient.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_line.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_pareto.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_pattern.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_pie.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_radar.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_scatter.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_secondary_axis.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_stock.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chart_styles.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/chartsheet.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/check_close.py +5 -4
- xlsxwriter-3.2.2/examples/checkbox.py +39 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/comments1.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/comments2.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/conditional_format.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/context_manager.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/data_validate.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/datetimes.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/defined_name.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/demo.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/diagonal_border.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/django_simple.py +7 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/doc_properties.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/dynamic_arrays.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/embedded_images.py +7 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/headers_footers.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/hello_world.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/hide_row_col.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/hide_sheet.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/http_server.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/hyperlink.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/ignore_errors.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/images.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/images_bytesio.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/inheritance1.py +5 -5
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/inheritance2.py +8 -8
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/lambda.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/macros.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/merge1.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/merge_rich_string.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/outline.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/outline_collapsed.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_autofilter.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_chart.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_chart_columns.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_chart_line.py +4 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_column_formats.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_conditional_format.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_datetime.py +4 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_header_format.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_multiple.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_percentage.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_positioning.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_simple.py +2 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/pandas_table.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/panes.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_chart.py +4 -2
- xlsxwriter-3.2.2/examples/polars_checkbox.py +31 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_conditional_format.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_format_custom.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_format_default.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_multiple.py +4 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_positioning.py +5 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_simple.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_sparklines.py +3 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/polars_xlsxwriter.py +4 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/rich_strings.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/right_to_left.py +2 -1
- xlsxwriter-3.2.2/examples/sensitivity_label.py +30 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/sparklines1.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/sparklines2.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/tab_colors.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/tables.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/text_indent.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/textbox.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/tutorial1.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/tutorial2.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/tutorial3.py +3 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/unicode.py +2 -1
- xlsxwriter-3.2.2/examples/unicode_polish_utf8.py +39 -0
- xlsxwriter-3.2.2/examples/unicode_shift_jis.py +39 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/user_types1.py +6 -4
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/user_types2.py +6 -4
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/user_types3.py +5 -4
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/vba_extract.py +16 -15
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/watermark.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/worksheet_protection.py +2 -1
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/setup.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/__init__.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/app.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart.py +76 -80
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_area.py +5 -4
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_bar.py +8 -5
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_column.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_doughnut.py +8 -6
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_line.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_pie.py +9 -6
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_radar.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_scatter.py +7 -4
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chart_stock.py +6 -5
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/chartsheet.py +4 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/comments.py +9 -6
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/contenttypes.py +32 -21
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/core.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/custom.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/drawing.py +20 -28
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/exceptions.py +2 -1
- xlsxwriter-3.2.2/xlsxwriter/feature_property_bag.py +156 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/format.py +251 -67
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/metadata.py +8 -7
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/packager.py +40 -14
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/relationships.py +16 -10
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/rich_value.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/rich_value_rel.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/rich_value_structure.py +5 -4
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/rich_value_types.py +2 -15
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/shape.py +25 -23
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/sharedstrings.py +11 -10
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/styles.py +73 -24
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/table.py +3 -2
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/theme.py +6 -3
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/utility.py +141 -55
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/vml.py +22 -35
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/workbook.py +102 -52
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/worksheet.py +423 -340
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/xlsxwriter/xmlwriter.py +34 -33
- XlsxWriter-3.2.0/examples/unicode_polish_utf8.py +0 -38
- XlsxWriter-3.2.0/examples/unicode_shift_jis.py +0 -38
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/MANIFEST.in +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/XlsxWriter.egg-info/dependency_links.txt +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/XlsxWriter.egg-info/top_level.txt +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/autofilter_data.txt +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/unicode_polish_utf8.txt +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/unicode_shift_jis.txt +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/examples/vbaProject.bin +0 -0
- {XlsxWriter-3.2.0 → xlsxwriter-3.2.2}/setup.cfg +0 -0
|
@@ -1,10 +1,45 @@
|
|
|
1
|
+
Release 3.2.2 - January 28 2025
|
|
2
|
+
-------------------------------
|
|
3
|
+
|
|
4
|
+
* Added support for checkboxes via the :func:`insert_checkbox()` method.
|
|
5
|
+
|
|
6
|
+
Checkboxes are a new feature added to `Excel in 2024`_. They are a way of
|
|
7
|
+
displaying a boolean value as a checkbox in a cell. The underlying value is
|
|
8
|
+
still an Excel ``TRUE/FALSE`` boolean value and can be used in formulas and in
|
|
9
|
+
references.
|
|
10
|
+
|
|
11
|
+
.. image:: _images/checkbox.png
|
|
12
|
+
|
|
13
|
+
See :ref:`ex_checkbox`.
|
|
14
|
+
|
|
15
|
+
.. _Excel in 2024: https://techcommunity.microsoft.com/blog/excelblog/introducing-checkboxes-in-excel/4173561
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Release 3.2.1 - January 22 2025
|
|
19
|
+
--------------------------------
|
|
20
|
+
|
|
21
|
+
Added improvements to ``autofit()``.
|
|
22
|
+
|
|
23
|
+
* Added the optional ``max_width`` parameter to the :func:`autofit()` method to
|
|
24
|
+
work around the issue where the autofit width is too big.
|
|
25
|
+
|
|
26
|
+
Excel autofits very long strings up to limit of 1790 pixels/255 characters.
|
|
27
|
+
This is often too wide to display on a single screen at normal zoom. As such
|
|
28
|
+
the ``max_width`` parameter is provided to enable a smaller upper pixel limit
|
|
29
|
+
for autofitting long strings. See :func:`autofit()`.
|
|
30
|
+
|
|
31
|
+
:feature:`1106`.
|
|
32
|
+
|
|
33
|
+
* Added the :func:`cell_autofit_width` utility function to allow users to
|
|
34
|
+
calculate the auto-fit width for a cell value. This allows the user to
|
|
35
|
+
implement their own auto-fit logic. See :ref:`ex_autofit_manually`.
|
|
1
36
|
|
|
2
37
|
|
|
3
38
|
Release 3.2.0 - February 17 2024
|
|
4
39
|
--------------------------------
|
|
5
40
|
|
|
6
41
|
This is the 10th anniversary release of XlsxWriter. Version 0.0.1 was released
|
|
7
|
-
on February 17 2013. Since
|
|
42
|
+
on February 17 2013. Since then there have been 167 releases, 25,000 lines of
|
|
8
43
|
code, 1600 test cases, 700 pages of documentation, 71,000 users on GitHub, 50
|
|
9
44
|
contributors, 1000 closed issues and 150 million yearly downloads. Thanks to
|
|
10
45
|
everyone who has contributed code, given feedback or just used the library.
|
|
@@ -16,6 +51,9 @@ everyone who has contributed code, given feedback or just used the library.
|
|
|
16
51
|
This has been a frequently requested feature for people creating spreadsheets
|
|
17
52
|
with images for product items. See also :ref:`ex_embedded_images`.
|
|
18
53
|
|
|
54
|
+
.. image:: _images/embedded_images.png
|
|
55
|
+
|
|
56
|
+
|
|
19
57
|
* Fix issue where a horizontal alignment format was ignored if indentation was
|
|
20
58
|
also set.
|
|
21
59
|
|
|
@@ -118,9 +156,9 @@ Release 3.0.9 - March 10 2023
|
|
|
118
156
|
-----------------------------
|
|
119
157
|
|
|
120
158
|
* Add documentation and examples on :ref:`ewx_polars` to demonstrate new `Polars
|
|
121
|
-
<https://
|
|
159
|
+
<https://pola.rs/>`_ integration of XlsxWriter in `write_excel()`_.
|
|
122
160
|
|
|
123
|
-
.. _write_excel(): https://pola
|
|
161
|
+
.. _write_excel(): https://docs.pola.rs/py-polars/html/reference/api/polars.DataFrame.write_excel.html
|
|
124
162
|
|
|
125
163
|
* Add fix for rare issue with duplicate number formats.
|
|
126
164
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: XlsxWriter
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.2
|
|
4
4
|
Summary: A Python module for creating Excel XLSX files.
|
|
5
5
|
Home-page: https://github.com/jmcnamara/XlsxWriter
|
|
6
6
|
Author: John McNamara
|
|
@@ -18,8 +18,17 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
22
|
Requires-Python: >=3.6
|
|
22
23
|
License-File: LICENSE.txt
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: license
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
23
32
|
|
|
24
33
|
XlsxWriter
|
|
25
34
|
==========
|
|
@@ -55,29 +64,28 @@ Here is a simple example:
|
|
|
55
64
|
|
|
56
65
|
import xlsxwriter
|
|
57
66
|
|
|
58
|
-
|
|
59
67
|
# Create an new Excel file and add a worksheet.
|
|
60
|
-
workbook = xlsxwriter.Workbook(
|
|
68
|
+
workbook = xlsxwriter.Workbook("demo.xlsx")
|
|
61
69
|
worksheet = workbook.add_worksheet()
|
|
62
70
|
|
|
63
71
|
# Widen the first column to make the text clearer.
|
|
64
|
-
worksheet.set_column(
|
|
72
|
+
worksheet.set_column("A:A", 20)
|
|
65
73
|
|
|
66
74
|
# Add a bold format to use to highlight cells.
|
|
67
|
-
bold = workbook.add_format({
|
|
75
|
+
bold = workbook.add_format({"bold": True})
|
|
68
76
|
|
|
69
77
|
# Write some simple text.
|
|
70
|
-
worksheet.write(
|
|
78
|
+
worksheet.write("A1", "Hello")
|
|
71
79
|
|
|
72
80
|
# Text with formatting.
|
|
73
|
-
worksheet.write(
|
|
81
|
+
worksheet.write("A2", "World", bold)
|
|
74
82
|
|
|
75
83
|
# Write some numbers, with row/column notation.
|
|
76
84
|
worksheet.write(2, 0, 123)
|
|
77
85
|
worksheet.write(3, 0, 123.456)
|
|
78
86
|
|
|
79
87
|
# Insert an image.
|
|
80
|
-
worksheet.insert_image(
|
|
88
|
+
worksheet.insert_image("B5", "logo.png")
|
|
81
89
|
|
|
82
90
|
workbook.close()
|
|
83
91
|
|
|
@@ -32,29 +32,28 @@ Here is a simple example:
|
|
|
32
32
|
|
|
33
33
|
import xlsxwriter
|
|
34
34
|
|
|
35
|
-
|
|
36
35
|
# Create an new Excel file and add a worksheet.
|
|
37
|
-
workbook = xlsxwriter.Workbook(
|
|
36
|
+
workbook = xlsxwriter.Workbook("demo.xlsx")
|
|
38
37
|
worksheet = workbook.add_worksheet()
|
|
39
38
|
|
|
40
39
|
# Widen the first column to make the text clearer.
|
|
41
|
-
worksheet.set_column(
|
|
40
|
+
worksheet.set_column("A:A", 20)
|
|
42
41
|
|
|
43
42
|
# Add a bold format to use to highlight cells.
|
|
44
|
-
bold = workbook.add_format({
|
|
43
|
+
bold = workbook.add_format({"bold": True})
|
|
45
44
|
|
|
46
45
|
# Write some simple text.
|
|
47
|
-
worksheet.write(
|
|
46
|
+
worksheet.write("A1", "Hello")
|
|
48
47
|
|
|
49
48
|
# Text with formatting.
|
|
50
|
-
worksheet.write(
|
|
49
|
+
worksheet.write("A2", "World", bold)
|
|
51
50
|
|
|
52
51
|
# Write some numbers, with row/column notation.
|
|
53
52
|
worksheet.write(2, 0, 123)
|
|
54
53
|
worksheet.write(3, 0, 123.456)
|
|
55
54
|
|
|
56
55
|
# Insert an image.
|
|
57
|
-
worksheet.insert_image(
|
|
56
|
+
worksheet.insert_image("B5", "logo.png")
|
|
58
57
|
|
|
59
58
|
workbook.close()
|
|
60
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: XlsxWriter
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.2
|
|
4
4
|
Summary: A Python module for creating Excel XLSX files.
|
|
5
5
|
Home-page: https://github.com/jmcnamara/XlsxWriter
|
|
6
6
|
Author: John McNamara
|
|
@@ -18,8 +18,17 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
22
|
Requires-Python: >=3.6
|
|
22
23
|
License-File: LICENSE.txt
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: license
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
23
32
|
|
|
24
33
|
XlsxWriter
|
|
25
34
|
==========
|
|
@@ -55,29 +64,28 @@ Here is a simple example:
|
|
|
55
64
|
|
|
56
65
|
import xlsxwriter
|
|
57
66
|
|
|
58
|
-
|
|
59
67
|
# Create an new Excel file and add a worksheet.
|
|
60
|
-
workbook = xlsxwriter.Workbook(
|
|
68
|
+
workbook = xlsxwriter.Workbook("demo.xlsx")
|
|
61
69
|
worksheet = workbook.add_worksheet()
|
|
62
70
|
|
|
63
71
|
# Widen the first column to make the text clearer.
|
|
64
|
-
worksheet.set_column(
|
|
72
|
+
worksheet.set_column("A:A", 20)
|
|
65
73
|
|
|
66
74
|
# Add a bold format to use to highlight cells.
|
|
67
|
-
bold = workbook.add_format({
|
|
75
|
+
bold = workbook.add_format({"bold": True})
|
|
68
76
|
|
|
69
77
|
# Write some simple text.
|
|
70
|
-
worksheet.write(
|
|
78
|
+
worksheet.write("A1", "Hello")
|
|
71
79
|
|
|
72
80
|
# Text with formatting.
|
|
73
|
-
worksheet.write(
|
|
81
|
+
worksheet.write("A2", "World", bold)
|
|
74
82
|
|
|
75
83
|
# Write some numbers, with row/column notation.
|
|
76
84
|
worksheet.write(2, 0, 123)
|
|
77
85
|
worksheet.write(3, 0, 123.456)
|
|
78
86
|
|
|
79
87
|
# Insert an image.
|
|
80
|
-
worksheet.insert_image(
|
|
88
|
+
worksheet.insert_image("B5", "logo.png")
|
|
81
89
|
|
|
82
90
|
workbook.close()
|
|
83
91
|
|
|
@@ -12,6 +12,7 @@ examples/array_formula.py
|
|
|
12
12
|
examples/autofilter.py
|
|
13
13
|
examples/autofilter_data.txt
|
|
14
14
|
examples/autofit.py
|
|
15
|
+
examples/autofit_manually.py
|
|
15
16
|
examples/background.py
|
|
16
17
|
examples/cell_indentation.py
|
|
17
18
|
examples/chart.py
|
|
@@ -38,6 +39,7 @@ examples/chart_stock.py
|
|
|
38
39
|
examples/chart_styles.py
|
|
39
40
|
examples/chartsheet.py
|
|
40
41
|
examples/check_close.py
|
|
42
|
+
examples/checkbox.py
|
|
41
43
|
examples/comments1.py
|
|
42
44
|
examples/comments2.py
|
|
43
45
|
examples/conditional_format.py
|
|
@@ -83,6 +85,7 @@ examples/pandas_simple.py
|
|
|
83
85
|
examples/pandas_table.py
|
|
84
86
|
examples/panes.py
|
|
85
87
|
examples/polars_chart.py
|
|
88
|
+
examples/polars_checkbox.py
|
|
86
89
|
examples/polars_conditional_format.py
|
|
87
90
|
examples/polars_format_custom.py
|
|
88
91
|
examples/polars_format_default.py
|
|
@@ -93,6 +96,7 @@ examples/polars_sparklines.py
|
|
|
93
96
|
examples/polars_xlsxwriter.py
|
|
94
97
|
examples/rich_strings.py
|
|
95
98
|
examples/right_to_left.py
|
|
99
|
+
examples/sensitivity_label.py
|
|
96
100
|
examples/sparklines1.py
|
|
97
101
|
examples/sparklines2.py
|
|
98
102
|
examples/tab_colors.py
|
|
@@ -133,6 +137,7 @@ xlsxwriter/core.py
|
|
|
133
137
|
xlsxwriter/custom.py
|
|
134
138
|
xlsxwriter/drawing.py
|
|
135
139
|
xlsxwriter/exceptions.py
|
|
140
|
+
xlsxwriter/feature_property_bag.py
|
|
136
141
|
xlsxwriter/format.py
|
|
137
142
|
xlsxwriter/metadata.py
|
|
138
143
|
xlsxwriter/packager.py
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
# simple criteria so that some data is shown and some is hidden.
|
|
8
8
|
#
|
|
9
9
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
10
|
-
#
|
|
10
|
+
#
|
|
11
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
11
12
|
#
|
|
12
13
|
import xlsxwriter
|
|
13
14
|
|
|
@@ -26,7 +27,7 @@ worksheet7 = workbook.add_worksheet()
|
|
|
26
27
|
bold = workbook.add_format({"bold": 1})
|
|
27
28
|
|
|
28
29
|
# Open a text file with autofilter example data.
|
|
29
|
-
textfile = open("autofilter_data.txt")
|
|
30
|
+
textfile = open("autofilter_data.txt", encoding="utf-8")
|
|
30
31
|
|
|
31
32
|
# Read the headers from the first line of the input file.
|
|
32
33
|
headers = textfile.readline().strip("\n").split()
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
# worksheet columns based on the data in the cells.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
7
|
-
#
|
|
7
|
+
#
|
|
8
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
8
9
|
#
|
|
9
10
|
from xlsxwriter.workbook import Workbook
|
|
10
11
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
##############################################################################
|
|
2
|
+
#
|
|
3
|
+
# The following example demonstrates manually auto-fitting the the width of a
|
|
4
|
+
# column in Excel based on the maximum string width. The worksheet ``autofit()``
|
|
5
|
+
# method will do this automatically but occasionally you may need to control the
|
|
6
|
+
# maximum and minimum column widths yourself.
|
|
7
|
+
#
|
|
8
|
+
# SPDX-License-Identifier: BSD-2-Clause
|
|
9
|
+
#
|
|
10
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
11
|
+
#
|
|
12
|
+
from functools import reduce
|
|
13
|
+
|
|
14
|
+
import xlsxwriter
|
|
15
|
+
from xlsxwriter.utility import cell_autofit_width
|
|
16
|
+
|
|
17
|
+
workbook = xlsxwriter.Workbook("autofit.xlsx")
|
|
18
|
+
worksheet = workbook.add_worksheet()
|
|
19
|
+
|
|
20
|
+
# Some string data to write.
|
|
21
|
+
cities = ["Addis Ababa", "Buenos Aires", "Cairo", "Dhaka"]
|
|
22
|
+
|
|
23
|
+
# Write the strings:
|
|
24
|
+
worksheet.write_column(0, 0, cities)
|
|
25
|
+
|
|
26
|
+
# Find the maximum column width in pixels.
|
|
27
|
+
max_width = reduce(max, map(cell_autofit_width, cities))
|
|
28
|
+
|
|
29
|
+
# Set the column width as if it was auto-fitted.
|
|
30
|
+
worksheet.set_column_pixels(0, 0, max_width)
|
|
31
|
+
|
|
32
|
+
workbook.close()
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
# Python module.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
7
|
-
#
|
|
7
|
+
#
|
|
8
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
8
9
|
#
|
|
9
10
|
import xlsxwriter
|
|
10
11
|
|
|
11
|
-
|
|
12
12
|
# Create an new Excel file and add a worksheet.
|
|
13
13
|
workbook = xlsxwriter.Workbook("background.xlsx")
|
|
14
14
|
worksheet = workbook.add_worksheet()
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating Excel Area charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating Excel Bar charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# A demo of a clustered category chart in XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
from xlsxwriter.workbook import Workbook
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating Excel Column charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of a Combined chart in XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
from xlsxwriter.workbook import Workbook
|
|
9
10
|
|
|
@@ -43,7 +44,7 @@ column_chart1.add_series(
|
|
|
43
44
|
}
|
|
44
45
|
)
|
|
45
46
|
|
|
46
|
-
# Create a new
|
|
47
|
+
# Create a new line chart. This will use this as the secondary chart.
|
|
47
48
|
line_chart1 = workbook.add_chart({"type": "line"})
|
|
48
49
|
|
|
49
50
|
# Configure the data series for the secondary chart.
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
# Python and XlsxWriter.
|
|
5
5
|
#
|
|
6
6
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
7
|
-
#
|
|
7
|
+
#
|
|
8
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
8
9
|
#
|
|
9
10
|
|
|
10
11
|
from datetime import date
|
|
12
|
+
|
|
11
13
|
import xlsxwriter
|
|
12
14
|
|
|
13
15
|
workbook = xlsxwriter.Workbook("chart_date_axis.xlsx")
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
# a Gauge Chart in Excel: https://www.excel-easy.com/examples/gauge-chart.html
|
|
9
9
|
#
|
|
10
10
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
11
|
-
#
|
|
11
|
+
#
|
|
12
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
12
13
|
#
|
|
13
14
|
import xlsxwriter
|
|
14
15
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating Excel Line charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating of a Pareto chart with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of an Excel chart with patterns using Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating Excel Radar charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
# An example of creating Excel Scatter charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
import xlsxwriter
|
|
9
10
|
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
# An example of creating Excel Stock charts with Python and XlsxWriter.
|
|
4
4
|
#
|
|
5
5
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
7
8
|
#
|
|
8
9
|
from datetime import datetime
|
|
10
|
+
|
|
9
11
|
import xlsxwriter
|
|
10
12
|
|
|
11
13
|
workbook = xlsxwriter.Workbook("chart_stock.xlsx")
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
# the styles available in Excel 2013.
|
|
6
6
|
#
|
|
7
7
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
8
|
-
#
|
|
8
|
+
#
|
|
9
|
+
# Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
|
|
9
10
|
#
|
|
10
11
|
import xlsxwriter
|
|
11
12
|
|
|
@@ -25,7 +26,7 @@ for chart_type in chart_types:
|
|
|
25
26
|
for col_num in range(0, 64, 8):
|
|
26
27
|
chart = workbook.add_chart({"type": chart_type})
|
|
27
28
|
chart.add_series({"values": "=Data!$A$1:$A$6"})
|
|
28
|
-
chart.set_title({"name": "Style
|
|
29
|
+
chart.set_title({"name": f"Style {style_number}"})
|
|
29
30
|
chart.set_legend({"none": True})
|
|
30
31
|
chart.set_style(style_number)
|
|
31
32
|
|