Skip to content

Commit 1095fd1

Browse files
author
Joeperdefloep
committed
versionadded, fix tests
1 parent aec9389 commit 1095fd1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/io/excel/_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ class ExcelWriter(metaclass=abc.ABCMeta):
680680
host, port, username, password, etc., if using a URL that will
681681
be parsed by ``fsspec``, e.g., starting "s3://", "gcs://".
682682
683-
.. versionadded:: 1.2.0
683+
.. versionadded:: 1.4.0
684684
if_sheet_exists : {'error', 'new', 'replace', 'overwrite_cells'}, default 'error'
685685
How to behave when trying to write to a sheet that already
686686
exists (append mode only).

pandas/io/excel/_openpyxl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,12 @@ def write_cells(
437437
f"Sheet '{sheet_name}' already exists and "
438438
f"if_sheet_exists is set to 'error'."
439439
)
440-
elif self.if_sheet_exists == "write_to":
440+
elif self.if_sheet_exists == "overwrite_cells":
441441
wks = self.sheets[sheet_name]
442442
else:
443443
raise ValueError(
444444
f"'{self.if_sheet_exists}' is not valid for if_sheet_exists. "
445-
"Valid options are 'error', 'new', 'replace' and 'write_to'."
445+
"Valid options are 'error', 'new', 'replace' and 'overwrite_cells'."
446446
)
447447
else:
448448
wks = self.sheets[sheet_name]

0 commit comments

Comments
 (0)