from datetime import datetime
x="Hello, it is now %s." % datetime.now().strftime('%d-%m-%Y %H:%M:%S')
import csv
try:
with open('output.csv', 'w+') as csvFile:
writer=csv.writer(csvFile)
writer.writerow(x.encode('UTF-8'))
print(x.encode('UTF-8'))
finally:
csvFile.close()
import pandas as pd
data = pd.read_csv('output.csv')
data.to_excel('output.xlsk')
Is this office365 problem? or my code
environment:windows10
xlsk
– Backbreakerxlsx
, notxlsk
– Mcalpine