excel - How to convert a CSV to xlxs file in python -


i trying convert csv xlxs file format because have code meant read excel file, ended getting csv. there way convert csv file temp excel file , have not destroyed until reading process done. have tried using openpyxl ends not working , throwing error saying it's not zip file. tried converting csv text , storing in dictionary writing excel using xlrd pakage did not work aswell. wondering if there way in cc

seems open file in text mode. try open file

open('sample.csv', "rt", encoding="utf8") 

or

open('sample.csv', "rt", encoding="ascii") 

depending on encoding of file


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -