Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
377 views
in Technique[技术] by (71.8m points)

python - does xlwt support xlsx Format

I have searched into google and found some contradiction. Does xlwt support xlsx file (MS office 2007). I heard that xlwt 0.7.4 support xlsx file. Does anyone tried xlsx file writing operation with xlwt 0.7.4

The purpose of this question is,I do not have permission to install library if I need to install I need to provide more detail info. I need to write xlsx file in python.So if anyone has done similar thing it will help to provide better inforamtion

I have looked into this wiki page. https://pypi.python.org/pypi/xlwt But did not find that it support xlsx file

or Should I use https://pypi.python.org/pypi/openpyxl for writing xlsx File

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

openpyxl is guaranteed to write xlsx files. From a cursory read through some of the xlwt code and docs/examples, I don't think xlwt supports xlsx. If openpyxl does what you need it to do, why look elsewhere?

Edit: with xlwt version 0.7.4 I attempted to save a file as sample.xlsx. Upon attempting to open it I got a not valid error message, so no .xlsx files for now.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...