ENH: _openpyxl.py load_workbook allow to modify the read_only, data_only and keep_links parameters using engine_kwargs · Issue #55027 · pandas-dev/pandas (original) (raw)
Feature Type
- Adding new functionality to pandas
- Changing existing functionality in pandas
- Removing existing functionality in pandas
Problem Description
Dear Developers,
I was updating my libraries using Pandas 2.1.0 and Openpyxl 3.1.2 as engine and I found a missing point, months ago it was added the opportunity to include in the engine_kwargs for this lib the keep_vba parameter but, the other parameters were stablished /forced by default. If we want to change the behaviour we cannot doing it from pandas, that's why I;m requesting to include all these parameters as well not only the VBA.
Feature Description
the current definition on _openpyxl.py file is:
def load_workbook(
self, filepath_or_buffer: FilePath | ReadBuffer[bytes], engine_kwargs
) -> Workbook:
from openpyxl import load_workbook
return load_workbook(
filepath_or_buffer,
read_only=True,
data_only=True,
keep_links=False,
**engine_kwargs,
)
Alternative Solutions
and it must be just 👍
` def load_workbook(
self, filepath_or_buffer: FilePath | ReadBuffer[bytes], engine_kwargs
) -> Workbook:
from openpyxl import load_workbook
return load_workbook(
filepath_or_buffer,
**engine_kwargs,
)`
Additional Context
Many thanks for your support,