Valueerror: No Engine for Filetype: 'Xlsk'

Valueerror: No Engine for Filetype: 'Xlsk'
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

3

2 Answers

Your title answers the question. There is no such excel file format as '.xlsk'. Perhaps you meant

data.to_excel('output.xlsx')

?

simply try

df.to_csv("output.csv")
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.