Skip to content

BUG: ExcelWriter engine_kwargs not passed through to other engines than xlsxwriter #42292 #42214 #43440 #43442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
feefladder opened this issue Sep 7, 2021 · 1 comment · Fixed by #43445
Closed
3 tasks done
Labels
Enhancement IO Excel read_excel, to_excel
Milestone

Comments

@feefladder
Copy link
Contributor

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the master branch of pandas.

Reproducible Example

import pandas as pd
from datetime import datetime
with pd.ExcelWriter("file.xlsx",engine="openpyxl",engine_kwarg={"iso_dates":True}) as writer:
    pd.DataFrame([datetime(1996,20,10)]).to_excel(writer)

Issue Description

the arguments are silently not passed through to the openpyxl Workbook class.

Expected Behavior

This should either raise or pass through to the engine

Installed Versions

/home/kees/miniconda3/envs/pd-doc/lib/python3.8/site-packages/fastparquet/dataframe.py:5: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.NumericIndex with the appropriate dtype instead.
from pandas import (

INSTALLED VERSIONS

commit : 73c473d
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.8.0-59-generic
Version : #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.4.0.dev0+613.g73c473dce9.dirty
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 57.4.0
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.18.0
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : 3.0.1
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : 4.9.3
bottleneck : 1.3.2
fsspec : 2021.05.0
fastparquet : 0.7.1
gcsfs : 2021.05.0
matplotlib : 3.4.3
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.7
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : 2021.05.0
scipy : 1.7.1
sqlalchemy : 1.4.23
tables : 3.6.1
tabulate : 0.8.9
xarray : 0.18.2
xlrd : 2.0.1
xlwt : 1.3.0
numba : 0.53.1

@feefladder feefladder added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 7, 2021
@feefladder
Copy link
Contributor Author

feefladder commented Sep 7, 2021

this is the same for other engines. Also this cannot work properly in 'append' mode, because there the load_workbook is used:
https://github.com/pandas-dev/pandas/blob/73c473dce9f07bba96993c42843320e116cf94ea/pandas/io/excel/_openpyxl.py#L60-74

@lithomas1 lithomas1 added Enhancement IO Excel read_excel, to_excel and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 9, 2021
@lithomas1 lithomas1 added this to the Contributions Welcome milestone Sep 9, 2021
@jreback jreback modified the milestones: Contributions Welcome, 1.4 Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants