XlsxWriter 3.2.1__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.
Files changed (159) hide show
  1. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/Changes +20 -0
  2. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/LICENSE.txt +1 -1
  3. {XlsxWriter-3.2.1/XlsxWriter.egg-info → xlsxwriter-3.2.2}/PKG-INFO +16 -9
  4. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/README.rst +6 -7
  5. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2/XlsxWriter.egg-info}/PKG-INFO +16 -9
  6. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/XlsxWriter.egg-info/SOURCES.txt +3 -0
  7. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/array_formula.py +2 -1
  8. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/autofilter.py +2 -1
  9. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/autofit.py +2 -1
  10. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/autofit_manually.py +2 -1
  11. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/background.py +2 -1
  12. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/cell_indentation.py +2 -1
  13. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart.py +2 -1
  14. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_area.py +2 -1
  15. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_bar.py +2 -1
  16. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_clustered.py +2 -1
  17. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_column.py +2 -1
  18. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_combined.py +2 -1
  19. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_data_labels.py +2 -1
  20. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_data_table.py +2 -1
  21. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_data_tools.py +2 -1
  22. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_date_axis.py +2 -1
  23. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_doughnut.py +2 -1
  24. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_gauge.py +2 -1
  25. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_gradient.py +2 -1
  26. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_line.py +2 -1
  27. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_pareto.py +2 -1
  28. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_pattern.py +2 -1
  29. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_pie.py +2 -1
  30. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_radar.py +2 -1
  31. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_scatter.py +2 -1
  32. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_secondary_axis.py +2 -1
  33. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_stock.py +2 -1
  34. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chart_styles.py +2 -1
  35. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/chartsheet.py +2 -1
  36. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/check_close.py +2 -1
  37. xlsxwriter-3.2.2/examples/checkbox.py +39 -0
  38. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/comments1.py +2 -1
  39. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/comments2.py +2 -1
  40. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/conditional_format.py +2 -1
  41. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/context_manager.py +2 -1
  42. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/data_validate.py +2 -1
  43. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/datetimes.py +2 -1
  44. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/defined_name.py +2 -1
  45. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/demo.py +2 -1
  46. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/diagonal_border.py +2 -1
  47. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/django_simple.py +2 -1
  48. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/doc_properties.py +2 -1
  49. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/dynamic_arrays.py +2 -1
  50. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/embedded_images.py +2 -1
  51. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/headers_footers.py +2 -1
  52. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/hello_world.py +2 -1
  53. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/hide_row_col.py +2 -1
  54. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/hide_sheet.py +2 -1
  55. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/http_server.py +2 -1
  56. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/hyperlink.py +2 -1
  57. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/ignore_errors.py +2 -1
  58. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/images.py +2 -1
  59. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/images_bytesio.py +2 -1
  60. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/inheritance1.py +2 -1
  61. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/inheritance2.py +2 -1
  62. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/lambda.py +2 -1
  63. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/macros.py +2 -1
  64. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/merge1.py +2 -1
  65. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/merge_rich_string.py +2 -1
  66. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/outline.py +2 -1
  67. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/outline_collapsed.py +2 -1
  68. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_autofilter.py +2 -1
  69. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_chart.py +2 -1
  70. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_chart_columns.py +2 -1
  71. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_chart_line.py +2 -1
  72. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_column_formats.py +2 -1
  73. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_conditional_format.py +2 -1
  74. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_datetime.py +2 -1
  75. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_header_format.py +2 -1
  76. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_multiple.py +2 -1
  77. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_percentage.py +2 -1
  78. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_positioning.py +2 -1
  79. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_simple.py +2 -1
  80. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/pandas_table.py +2 -1
  81. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/panes.py +2 -1
  82. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_chart.py +2 -1
  83. xlsxwriter-3.2.2/examples/polars_checkbox.py +31 -0
  84. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_conditional_format.py +2 -1
  85. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_format_custom.py +2 -1
  86. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_format_default.py +2 -1
  87. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_multiple.py +2 -1
  88. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_positioning.py +2 -1
  89. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_simple.py +2 -1
  90. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_sparklines.py +2 -1
  91. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/polars_xlsxwriter.py +2 -1
  92. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/rich_strings.py +2 -1
  93. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/right_to_left.py +2 -1
  94. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/sensitivity_label.py +2 -1
  95. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/sparklines1.py +2 -1
  96. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/sparklines2.py +2 -1
  97. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/tab_colors.py +2 -1
  98. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/tables.py +2 -1
  99. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/text_indent.py +2 -1
  100. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/textbox.py +2 -1
  101. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/tutorial1.py +2 -1
  102. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/tutorial2.py +2 -1
  103. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/tutorial3.py +2 -1
  104. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/unicode.py +2 -1
  105. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/unicode_polish_utf8.py +2 -1
  106. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/unicode_shift_jis.py +2 -1
  107. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/user_types1.py +2 -1
  108. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/user_types2.py +2 -1
  109. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/user_types3.py +2 -1
  110. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/vba_extract.py +2 -1
  111. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/watermark.py +2 -1
  112. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/worksheet_protection.py +2 -1
  113. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/setup.py +1 -1
  114. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/__init__.py +3 -2
  115. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/app.py +2 -1
  116. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart.py +2 -1
  117. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_area.py +2 -1
  118. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_bar.py +2 -1
  119. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_column.py +2 -1
  120. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_doughnut.py +2 -1
  121. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_line.py +2 -1
  122. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_pie.py +2 -1
  123. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_radar.py +2 -1
  124. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_scatter.py +2 -1
  125. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chart_stock.py +2 -1
  126. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/chartsheet.py +2 -1
  127. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/comments.py +2 -1
  128. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/contenttypes.py +11 -1
  129. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/core.py +2 -1
  130. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/custom.py +2 -1
  131. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/drawing.py +2 -1
  132. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/exceptions.py +2 -1
  133. xlsxwriter-3.2.2/xlsxwriter/feature_property_bag.py +156 -0
  134. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/format.py +22 -1
  135. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/metadata.py +2 -1
  136. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/packager.py +26 -1
  137. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/relationships.py +9 -3
  138. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/rich_value.py +2 -1
  139. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/rich_value_rel.py +2 -1
  140. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/rich_value_structure.py +2 -1
  141. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/rich_value_types.py +2 -1
  142. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/shape.py +2 -1
  143. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/sharedstrings.py +2 -1
  144. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/styles.py +71 -19
  145. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/table.py +2 -1
  146. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/theme.py +2 -1
  147. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/utility.py +2 -1
  148. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/vml.py +2 -1
  149. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/workbook.py +17 -1
  150. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/worksheet.py +46 -7
  151. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/xlsxwriter/xmlwriter.py +2 -1
  152. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/MANIFEST.in +0 -0
  153. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/XlsxWriter.egg-info/dependency_links.txt +0 -0
  154. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/XlsxWriter.egg-info/top_level.txt +0 -0
  155. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/autofilter_data.txt +0 -0
  156. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/unicode_polish_utf8.txt +0 -0
  157. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/unicode_shift_jis.txt +0 -0
  158. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/examples/vbaProject.bin +0 -0
  159. {XlsxWriter-3.2.1 → xlsxwriter-3.2.2}/setup.cfg +0 -0
@@ -1,3 +1,20 @@
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
+
1
18
  Release 3.2.1 - January 22 2025
2
19
  --------------------------------
3
20
 
@@ -34,6 +51,9 @@ everyone who has contributed code, given feedback or just used the library.
34
51
  This has been a frequently requested feature for people creating spreadsheets
35
52
  with images for product items. See also :ref:`ex_embedded_images`.
36
53
 
54
+ .. image:: _images/embedded_images.png
55
+
56
+
37
57
  * Fix issue where a horizontal alignment format was ignored if indentation was
38
58
  also set.
39
59
 
@@ -1,6 +1,6 @@
1
1
  BSD 2-Clause License
2
2
 
3
- Copyright (c) 2013-2024, John McNamara <jmcnamara@cpan.org>
3
+ Copyright (c) 2013-2025, John McNamara <jmcnamara@cpan.org>
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: XlsxWriter
3
- Version: 3.2.1
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
@@ -21,6 +21,14 @@ Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Requires-Python: >=3.6
23
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
24
32
 
25
33
  XlsxWriter
26
34
  ==========
@@ -56,29 +64,28 @@ Here is a simple example:
56
64
 
57
65
  import xlsxwriter
58
66
 
59
-
60
67
  # Create an new Excel file and add a worksheet.
61
- workbook = xlsxwriter.Workbook('demo.xlsx')
68
+ workbook = xlsxwriter.Workbook("demo.xlsx")
62
69
  worksheet = workbook.add_worksheet()
63
70
 
64
71
  # Widen the first column to make the text clearer.
65
- worksheet.set_column('A:A', 20)
72
+ worksheet.set_column("A:A", 20)
66
73
 
67
74
  # Add a bold format to use to highlight cells.
68
- bold = workbook.add_format({'bold': True})
75
+ bold = workbook.add_format({"bold": True})
69
76
 
70
77
  # Write some simple text.
71
- worksheet.write('A1', 'Hello')
78
+ worksheet.write("A1", "Hello")
72
79
 
73
80
  # Text with formatting.
74
- worksheet.write('A2', 'World', bold)
81
+ worksheet.write("A2", "World", bold)
75
82
 
76
83
  # Write some numbers, with row/column notation.
77
84
  worksheet.write(2, 0, 123)
78
85
  worksheet.write(3, 0, 123.456)
79
86
 
80
87
  # Insert an image.
81
- worksheet.insert_image('B5', 'logo.png')
88
+ worksheet.insert_image("B5", "logo.png")
82
89
 
83
90
  workbook.close()
84
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('demo.xlsx')
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('A:A', 20)
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({'bold': True})
43
+ bold = workbook.add_format({"bold": True})
45
44
 
46
45
  # Write some simple text.
47
- worksheet.write('A1', 'Hello')
46
+ worksheet.write("A1", "Hello")
48
47
 
49
48
  # Text with formatting.
50
- worksheet.write('A2', 'World', bold)
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('B5', 'logo.png')
56
+ worksheet.insert_image("B5", "logo.png")
58
57
 
59
58
  workbook.close()
60
59
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: XlsxWriter
3
- Version: 3.2.1
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
@@ -21,6 +21,14 @@ Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Requires-Python: >=3.6
23
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
24
32
 
25
33
  XlsxWriter
26
34
  ==========
@@ -56,29 +64,28 @@ Here is a simple example:
56
64
 
57
65
  import xlsxwriter
58
66
 
59
-
60
67
  # Create an new Excel file and add a worksheet.
61
- workbook = xlsxwriter.Workbook('demo.xlsx')
68
+ workbook = xlsxwriter.Workbook("demo.xlsx")
62
69
  worksheet = workbook.add_worksheet()
63
70
 
64
71
  # Widen the first column to make the text clearer.
65
- worksheet.set_column('A:A', 20)
72
+ worksheet.set_column("A:A", 20)
66
73
 
67
74
  # Add a bold format to use to highlight cells.
68
- bold = workbook.add_format({'bold': True})
75
+ bold = workbook.add_format({"bold": True})
69
76
 
70
77
  # Write some simple text.
71
- worksheet.write('A1', 'Hello')
78
+ worksheet.write("A1", "Hello")
72
79
 
73
80
  # Text with formatting.
74
- worksheet.write('A2', 'World', bold)
81
+ worksheet.write("A2", "World", bold)
75
82
 
76
83
  # Write some numbers, with row/column notation.
77
84
  worksheet.write(2, 0, 123)
78
85
  worksheet.write(3, 0, 123.456)
79
86
 
80
87
  # Insert an image.
81
- worksheet.insert_image('B5', 'logo.png')
88
+ worksheet.insert_image("B5", "logo.png")
82
89
 
83
90
  workbook.close()
84
91
 
@@ -39,6 +39,7 @@ examples/chart_stock.py
39
39
  examples/chart_styles.py
40
40
  examples/chartsheet.py
41
41
  examples/check_close.py
42
+ examples/checkbox.py
42
43
  examples/comments1.py
43
44
  examples/comments2.py
44
45
  examples/conditional_format.py
@@ -84,6 +85,7 @@ examples/pandas_simple.py
84
85
  examples/pandas_table.py
85
86
  examples/panes.py
86
87
  examples/polars_chart.py
88
+ examples/polars_checkbox.py
87
89
  examples/polars_conditional_format.py
88
90
  examples/polars_format_custom.py
89
91
  examples/polars_format_default.py
@@ -135,6 +137,7 @@ xlsxwriter/core.py
135
137
  xlsxwriter/custom.py
136
138
  xlsxwriter/drawing.py
137
139
  xlsxwriter/exceptions.py
140
+ xlsxwriter/feature_property_bag.py
138
141
  xlsxwriter/format.py
139
142
  xlsxwriter/metadata.py
140
143
  xlsxwriter/packager.py
@@ -4,7 +4,8 @@
4
4
  # simple array formulas.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
10
+ #
11
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
11
12
  #
12
13
  import xlsxwriter
13
14
 
@@ -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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  from xlsxwriter.workbook import Workbook
10
11
 
@@ -6,7 +6,8 @@
6
6
  # maximum and minimum column widths yourself.
7
7
  #
8
8
  # SPDX-License-Identifier: BSD-2-Clause
9
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
9
+ #
10
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
10
11
  #
11
12
  from functools import reduce
12
13
 
@@ -4,7 +4,8 @@
4
4
  # Python module.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -5,7 +5,8 @@
5
5
  # This program demonstrates the indentation cell format.
6
6
  #
7
7
  # SPDX-License-Identifier: BSD-2-Clause
8
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
8
+ #
9
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
9
10
  #
10
11
  import xlsxwriter
11
12
 
@@ -3,7 +3,8 @@
3
3
  # An example of a simple Excel chart with Python and XlsxWriter.
4
4
  #
5
5
  # SPDX-License-Identifier: BSD-2-Clause
6
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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 Area charts with Python and XlsxWriter.
4
4
  #
5
5
  # SPDX-License-Identifier: BSD-2-Clause
6
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
6
+ #
7
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
7
8
  #
8
9
  from xlsxwriter.workbook import Workbook
9
10
 
@@ -4,7 +4,8 @@
4
4
  # via an XlsxWriter chart.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -4,7 +4,8 @@
4
4
  # Python and XlsxWriter.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -7,7 +7,8 @@
7
7
  # High-Low Lines and Up-Down Bars.
8
8
  #
9
9
  # SPDX-License-Identifier: BSD-2-Clause
10
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
10
+ #
11
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
11
12
  #
12
13
  import xlsxwriter
13
14
 
@@ -4,7 +4,8 @@
4
4
  # Python and XlsxWriter.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
 
10
11
  from datetime import date
@@ -9,7 +9,8 @@
9
9
  # assign formatting to each point in the series.
10
10
  #
11
11
  # SPDX-License-Identifier: BSD-2-Clause
12
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
12
+ #
13
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
13
14
  #
14
15
  import xlsxwriter
15
16
 
@@ -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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
11
+ #
12
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
12
13
  #
13
14
  import xlsxwriter
14
15
 
@@ -4,7 +4,8 @@
4
4
  # Python and XlsxWriter.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
6
+ #
7
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
7
8
  #
8
9
  import xlsxwriter
9
10
 
@@ -9,7 +9,8 @@
9
9
  # assign formatting to each point in the series.
10
10
  #
11
11
  # SPDX-License-Identifier: BSD-2-Clause
12
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
12
+ #
13
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
13
14
  #
14
15
  import xlsxwriter
15
16
 
@@ -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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
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
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
6
+ #
7
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
7
8
  #
8
9
  import xlsxwriter
9
10
 
@@ -4,7 +4,8 @@
4
4
  # using Python and XlsxWriter.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -3,7 +3,8 @@
3
3
  # An example of creating Excel Stock charts with Python and XlsxWriter.
4
4
  #
5
5
  # SPDX-License-Identifier: BSD-2-Clause
6
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
6
+ #
7
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
7
8
  #
8
9
  from datetime import datetime
9
10
 
@@ -5,7 +5,8 @@
5
5
  # the styles available in Excel 2013.
6
6
  #
7
7
  # SPDX-License-Identifier: BSD-2-Clause
8
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
8
+ #
9
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
9
10
  #
10
11
  import xlsxwriter
11
12
 
@@ -4,7 +4,8 @@
4
4
  # and XlsxWriter.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -3,7 +3,8 @@
3
3
  # A simple program demonstrating a check for exceptions when closing the file.
4
4
  #
5
5
  # SPDX-License-Identifier: BSD-2-Clause
6
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
6
+ #
7
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
7
8
  #
8
9
  import xlsxwriter
9
10
 
@@ -0,0 +1,39 @@
1
+ ##############################################################################
2
+ #
3
+ # An example of adding checkbox boolean values to a worksheet using the the
4
+ # XlsxWriter Python module.
5
+ #
6
+ # SPDX-License-Identifier: BSD-2-Clause
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
9
+ #
10
+ import xlsxwriter
11
+
12
+ # Create a new Excel file object.
13
+ workbook = xlsxwriter.Workbook("checkbox.xlsx")
14
+
15
+ # Add a worksheet to the workbook.
16
+ worksheet = workbook.add_worksheet()
17
+
18
+ # Create some formats to use in the worksheet.
19
+ bold = workbook.add_format({"bold": True})
20
+ light_red = workbook.add_format({"bg_color": "#FFC7CE"})
21
+ light_green = workbook.add_format({"bg_color": "#C6EFCE"})
22
+
23
+ # Set the column width for clarity.
24
+ worksheet.set_column(0, 0, 30)
25
+
26
+ # Write some descriptions.
27
+ worksheet.write(1, 0, "Some simple checkboxes:", bold)
28
+ worksheet.write(4, 0, "Some checkboxes with cell formats:", bold)
29
+
30
+ # Insert some boolean checkboxes to the worksheet.
31
+ worksheet.insert_checkbox(1, 1, False)
32
+ worksheet.insert_checkbox(2, 1, True)
33
+
34
+ # Insert some checkboxes with cell formats.
35
+ worksheet.insert_checkbox(4, 1, False, light_red)
36
+ worksheet.insert_checkbox(5, 1, True, light_green)
37
+
38
+ # Close the workbook.
39
+ workbook.close()
@@ -6,7 +6,8 @@
6
6
  # For more advanced comment options see comments2.py.
7
7
  #
8
8
  # SPDX-License-Identifier: BSD-2-Clause
9
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
9
+ #
10
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
10
11
  #
11
12
  import xlsxwriter
12
13
 
@@ -6,7 +6,8 @@
6
6
  # Each of the worksheets demonstrates different features of cell comments.
7
7
  #
8
8
  # SPDX-License-Identifier: BSD-2-Clause
9
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
9
+ #
10
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
10
11
  #
11
12
  import xlsxwriter
12
13
 
@@ -6,7 +6,8 @@
6
6
  # range of cells based on certain criteria.
7
7
  #
8
8
  # SPDX-License-Identifier: BSD-2-Clause
9
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
9
+ #
10
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
10
11
  #
11
12
  import xlsxwriter
12
13
 
@@ -4,7 +4,8 @@
4
4
  # manager. This doesn't require an explicit close().
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  import xlsxwriter
10
11
 
@@ -9,7 +9,8 @@
9
9
  # a drop down list.
10
10
  #
11
11
  # SPDX-License-Identifier: BSD-2-Clause
12
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
12
+ #
13
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
13
14
  #
14
15
  from datetime import date, time
15
16
 
@@ -4,7 +4,8 @@
4
4
  # using the XlsxWriter Python module.
5
5
  #
6
6
  # SPDX-License-Identifier: BSD-2-Clause
7
- # Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
7
+ #
8
+ # Copyright (c) 2013-2025, John McNamara, jmcnamara@cpan.org
8
9
  #
9
10
  from datetime import datetime
10
11