Not able to read xlsx file using pandas.read_excel(file, skiprows=2) if data starts on N1 and A1 is empty
I was unable to find a good descriptive title for this issue.
I found this bug when working with Pandas, but the problem seems to lie in the openpyxl library when getting coordinates.
The format of the excel file is that the first two rows contains a summary and the headers of the data start on row 3. Data in the first row starts at N column in row 1 (N1). (For debugging purposes, its a formula =SUM(N4:N100000))
I am only interested in the data starting from Row 3.
When I use pandas.read_excel(filename, skiprows=2) I get an empty keyError. A coworker tracked it down to the openpyxl function calculating coordinates.
If I remove the summary (Meaning row 1 and 2 are blank) this works properly. If I add random data to A1 while keeping the summary on N1 it works. If I convert the formula in N1 to hard coded value, it works. (So it seems the problem is connected to the formula?) So I added the same formula to A1, and that also works.
So the problem only occurs if A1 is empty, and some other cell in row 1 contains a formula.
This is pretty obscure but I figured I'd register the bug since skiprows supposedly should be a straight forward operation.