File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -2252,11 +2252,17 @@ def to_excel(
22522252 and cell character count does not exceed Excel's limitations.
22532253 All other limitations must be checked by the user.
22542254
2255- Excel treats any cell starting with `=` as a formula, which can pose security
2256- risks. To store such content as plain text, prepend an apostrophe (`'`), e.g.,
2257- change `"=foobar"` to `"'=foobar"`. For `xlsxwriter`, you can use
2258- `engine_kwargs={"options": {"strings_to_formulas": False}}` to disable formula
2259- interpretation without prepending an apostrophe.
2255+ Excel treats any cell starting with ``=`` as a formula, which can pose security
2256+ risks. To store such content as plain text, you can either:
2257+
2258+ * Prepend an apostrophe to the value, e.g. ``"'=foobar"``
2259+ * For ``xlsxwriter``, disable formula interpretation:
2260+
2261+ .. code-block:: python
2262+
2263+ df.to_excel(
2264+ "path.xlsx", engine_kwargs={"options": {"strings_to_formulas": False}}
2265+ )
22602266
22612267 Examples
22622268 --------
You can’t perform that action at this time.
0 commit comments