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 :
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
For example only with this code:
import openpyxl
global book
filename='C:/Users/victor/12149.xlsm'
book = openpyxl.load_workbook(filename, keep_vba=True)
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])