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(
2252
2252
and cell character count does not exceed Excel's limitations.
2253
2253
All other limitations must be checked by the user.
2254
2254
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
+ )
2260
2266
2261
2267
Examples
2262
2268
--------
You can’t perform that action at this time.
0 commit comments