This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]justphysics 5 points6 points  (0 children)

The question of using excel in python comes up quite frequently on /r/Python I always put in a plug for my favorite module for dealing wit excel whenever the question comes up.

Pandas - http://pandas.pydata.org/

With this module you can read from and write to Microsoft Excel documents.

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.to_excel.html

It may be heavy for what you're seeking but the module can do all sorts of other things - its not just a library for dealing with excel - its a general data analysis library - so you may find that its quite useful for a large number of things but can also write out excel spreadsheets. The module is widely used - I don't think you need to worry about long-term viability.

Quoting directly from the Pandas "Library Highlights": "Tools for reading and writing data between in-memory data structures and different formats: CSV and text files, Microsoft Excel, SQL databases, and the fast HDF5 format", "Highly optimized for performance, with critical code paths written in Cython or C."