MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » December 2012

Re: CSV to XLS(x)



fixed

On Tue, Dec 4, 2012 at 4:10 PM, Peter Connell <Peter.Connell@xxxxxxxxxx> wrote:
Very interesting.
Do you if there is support for the reverse XLS(x) to CSV?

You can read XLS and XLSX files using the xlrd package, which is
written and maintained by the same guy responsible for xlwt. Python
comes with its own CSV module, so once you're able to read data from
the Excel file, it's rather trivial to write to CSV.

Note that for writing Excel files, xlwt only supports XLS. Right now,
the best Python package I know of for writing to XLSX is openpyxl. It
also reads XLSX but doesn't know how to do anything at all with XLS.
It's written by someone else, and the design is very different from
xlrd and xlwt. I have tried all of these on the i, and they all work,
as far as I can tell.

John

http://pypi.python.org/pypi/xlrd (to read XLS and XLSX)
http://pypi.python.org/pypi/xlwt (to write XLS)
http://pypi.python.org/pypi/openpyxl (to read and write XLSX)





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact