I have an excel file that has the value 20220831 on cell C2, and the cell format is set as date.
When I try to load the file with openpyxl I get this warning:
C:\Users\joaquim.MASCARELL\AppData\Local\Programs\Python\Python310\lib\site-packages\openpyxl\worksheet\_reader.py:211: UserWarning: Cell C2 is marked as a date but the serial value 20220831 is outside the limits for dates. The cell will be treated as an error.
warn(msg)
And trying to get the cell value results in "#VALUE!":
wb = xl.load_workbook(file)
sheet = wb["Sheet1"]
print(sheet["C2"].value)
>>#VALUE!
I would like to get the integer value "20220831".
Is there any parameter that I can pass in order to ignore the type mark and simply return the value that is stored in the xml?