I am trying to paste a date using python code onto an excel cell
ws.Range('A1').Value = '11/06/2020'
i.e. 11 June 2020
and what I see in that excel cell is 06/11/2020
i.e. 6th of November 2020.
Any clues what is going on?
Running this on my windows, same code on my Mac runs fine!
codes, if anyone interested
import win32com.client
from datetime import datetime
xlapp = win32com.client.DispatchEx("Excel.Application")
xlapp.Workbooks.Open('C:\\blp\\API\\Office Tools\\BloombergUI.xla')
xlapp.RegisterXLL('C:/blp/API/Office Tools/bofaddin.dll')
filepath = give the path here
wb = xlapp.Workbooks.Open(filepath,None,False)
xlapp.Visible = True
wb_addin = ('C:/blp/API/Office Tools/bofaddin.dll')
ws = wb.Worksheets[‘AB’]
ws.Range('A18').Value = '11/06/2020'
additional comments: btw feels like its an issue when you use win32com. I just tried using openpyxl and it worked fine. unfortunately I have to use BBG addins in my excel and that works the best with win32com it seems