Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: Creating a Super Simple WWW Link, Copy, & Paste into Spreadsheet Program Date: 14 Jun 2013 12:50:24 GMT Organization: Norwich University Lines: 25 Message-ID: References: <34b25d59-63b8-44e7-ac10-0afc52a7d726@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net 2LkoR2C1zslkvG2RH3BqcAbLi6qcyMmh3WOgkdf1B0oX4fHqF7 Cancel-Lock: sha1:oJ+SXMnJ4nLs+zt1+DhNpFVwTWA= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: csiph.com comp.lang.python:48137 On 2013-06-13, Nick Cash 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