Creating a Super Simple WWW Link, Copy, & Paste into Spreadsheet Program
Neil Cerutti
neilc at norwich.edu
Fri Jun 14 08:50:24 EDT 2013
On 2013-06-13, Nick Cash <nick.cash at npcinternational.com> wrote:
>>> there is a python module that reads and writes to excel files. look
>>> for that
>
>>More than one, actually, and which to use depends on whether
>>"Excel files" means the .xls or .xlsx format. On Windows, the
>>most flexible solution is going to be to just use COM to
>>control the Excel >application in reading and writing the
>>files. Outside of Windows, the best bet is usually to work
>>>with csv files instead, as Dave suggested.
>
> I've had success with the xlrd and xlwt suite of modules
> (http://www.python-excel.org/), using both .xls and .xlsx, on
> Linux.
I use xlrd for .xlsx on Windows with Office 2007, no problems.
I wouldn't call it convenient, though. It saves a coworker from
doing an export which seems worth it, but using csv.DictReader
is, much, much simpler. Unless there's some non-trivial need to
use Excel directly I strongly recommend exporting as csv and
using the csv module.
--
Neil Cerutti
More information about the Python-list
mailing list