Skip to content

Commit

Permalink
doc: add version warning to embed_image()
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Feb 23, 2024
1 parent c3247af commit 5ed3b90
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions dev/docs/source/worksheet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1430,8 +1430,9 @@ of the image is preserved but the size of the image is adjusted to fit the
largest possible width or height depending on the cell dimensions.

This is the equivalent of Excel's menu option to insert an image using the
option to "Place in Cell". See :func:`insert_image` for the equivalent method to
"Place over Cells".
option to "Place in Cell" which is only available in Excel 365 versions from
2023 onwards. For older versions of Excel a ``#VALUE!`` error is displayed. See
:func:`insert_image` for the equivalent method to "Place over Cells".

Here is an example::

Expand Down
10 changes: 7 additions & 3 deletions examples/embedded_images.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
##############################################################################
#
# An example of embedding images into a worksheet cells using the XlsxWriter
# Python module. This is equivalent to Excel's "Place in cell" image insert.
# Python module.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright 2013-2024, John McNamara, jmcnamara@cpan.org
# This is the equivalent of Excel's menu option to insert an image using the
# option to "Place in Cell" which is only available in Excel 365 versions from
# 2023 onwards. For older versions of Excel a ``#VALUE!`` error is displayed.
#
# SPDX-License-Identifier: BSD-2-Clause Copyright 2013-2024, John McNamara,
# jmcnamara@cpan.org
#
import xlsxwriter

Expand Down

0 comments on commit 5ed3b90

Please sign in to comment.