openpyxl icon indicating copy to clipboard operation
openpyxl copied to clipboard

Can not open excel with filtered column

Open gelekgm opened this issue 1 year ago • 4 comments

Hello, There`s and issue with 'self.read_worksheets()' when trying to open Excel file with specific structure. Issue discovered within pandas as backend. Method is unable to open excel file when there is column with filter that hide 'blank' cells. More details in link below

https://github.com/pandas-dev/pandas/issues/51557

gelekgm avatar Apr 14 '23 06:04 gelekgm

I can confirm the issue. it emerged in the latest vesion: 3.1.2. On the other hand, if downgrading openpyxl to 3.0.10, the ValueError will be gone.

see discussion here: https://github.com/pandas-dev/pandas/issues/53238

and attached excel file tto test.

test-filter.xlsx

azhu26 avatar May 16 '23 17:05 azhu26

Was also encountering this, looks like Openpyxl is using this source https://foss.heptapod.net/openpyxl/openpyxl

fjcamillo avatar Jun 28 '23 15:06 fjcamillo

Is there a plan to fix this or a workaround to read from a worksheet with an active filter? My use case will be ingesting worksheets from customers so simply removing the filter in the excel file is not an option

jacmrob avatar Sep 25 '23 19:09 jacmrob

There is work in progress here: https://foss.heptapod.net/openpyxl/openpyxl/-/issues/1967

obertrand-ewolff avatar Feb 21 '24 15:02 obertrand-ewolff