Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - Best Module to write into XLS files [closed]

Tags:

python

I want to read a text file, write into an windows .xls file ie., create a .xls file and later do some modifications to the created .xls file. I have google'd as to what are all the available packages:

Win32 Com client
 --> xlrd (Only for Reading from xls files I guess)
|
 --> xlwt (only for writing into xls files)
PyExcelerator

What is the best module to perform these actions? Any suggestions?

like image 542
Bhavani Kannan Avatar asked Jul 26 '11 04:07

Bhavani Kannan


1 Answers

xlwt works great.

If you want to create .xlsx files (the new format used in Office 2007 and 2010), there is openpyxl.

I would recommend a native python library (xlwt or openpyxl) over using PyWin32 COM automation to drive Excel.

like image 74
codeape Avatar answered Nov 16 '22 00:11

codeape