I trying to save datetime object to xlsx as date format in cell. But what i have is Custom format. What i am doing wrong that output is Custom format. In input file also date is is custom format.
//Input file is xls so i convert it to xlsx
writer = pd.ExcelWriter('C:/Download/qaz.xlsx',
engine='xlsxwriter', mode='w', datetime_format='dd/mm/yyyy',
date_format='dd/mm/yyyy')
output = pd.read_excel('C:/IVRS/Download/qaz.xls').to_excel(writer, index=False)
writer.save()
wb = openpyxl.reader.excel.load_workbook('C:/Download/qaz.xlsx')
ws = wb.active
cell = ws['E4'].value
//datetime.datetime
nsmmyy=NamedStyle(name="cd1", number_format="DD-MM-YYYY")
cell.style = nsmmyy
regards