0
for clid in ClientID:
        filename = path_xlsx.replace('/', '\\') + '\\' + str(ClientID[clid])
        # print(filename)
        
        for i in range(len(csv)):
            if str(csv.loc[i, 'ClientID']) == clid:
                
                book = openpyxl.load_workbook(filename, keep_vba=True)

I have this error below :

enter image description here

Excel name (filename is :12149.xlsm)

a other same excel but with some modification inside it's working, only this one don't want to open

enter image description here

For example only with this code:

import openpyxl
global book

filename='C:/Users/victor/12149.xlsm'
book = openpyxl.load_workbook(filename, keep_vba=True)

I have the same mistake: enter image description here

def from_excel(value, offset=CALENDAR_WINDOWS_1900):
    if value is None:
        return
    if 1 < value < 60 and offset == CALENDAR_WINDOWS_1900:
        value += 1
    parts = list(jd2gcal(MJD_0, value + offset - MJD_0))
    _, fraction = divmod(value, 1)
    jumped = (parts[-1] == 0 and fraction > 0)
    diff = datetime.timedelta(days=fraction)

    if 0 < abs(value) < 1:
        return days_to_time(diff)
    if not jumped:
        return datetime.datetime(*parts[:3]) + diff
    else:
        return datetime.datetime(*parts[:3] + [0])
  • Like a int size issue in Windows 32 bit. See this: [https://stackoverflow.com/questions/38314118/overflowerror-python-int-too-large-to-convert-to-c-long-on-windows-but-not-ma](https://stackoverflow.com/questions/38314118/overflowerror-python-int-too-large-to-convert-to-c-long-on-windows-but-not-ma) – David Richardson Mar 16 '21 at 21:41
  • I have , 64-bit operating system, x64-based processor. I don't understand , I just open a excel. And What I see the difference with other excel it's Scale =No and Links dirty?=No – tradebigshort Mar 16 '21 at 23:31
  • 1
    The one thing it is complaining about here is that it got an overflow when translating an Excel date, and yet in all of this, you have not showed us any of the Excel data. DO you have very large values stored as dates? Have you tried exporting to a CSV to see what the columns look like? – Tim Roberts Mar 17 '21 at 00:56
  • I'm running into a similar error "OverflowError: signed integer is greater than maximum" from the same line of code in `from_excel`. An example Excel file to reproduce this would be great. – Alex Hall Aug 23 '22 at 12:45

0 Answers0