[Tutor] Read Excel file without COM

Eric Walker ewalker at micron.com
Tue Nov 29 21:26:01 CET 2005

I found some stuff when I was playing around with win32. It does allow you to 
read from excell sheets...

Eric ...

On Tuesday 29 November 2005 01:13 pm, Liam Clarke-Hutchinson wrote:
> Actually, and I'm surprising myself here, but COM would be the easiest way
> to go about this if you're not able to convert to CSV. If you want to avoid
> COM, why don't you use it to save each page of the spreadsheet as a CSV
> file and then go from there?
> The close tie-in between Excel and COM is designed for your problem...
> Alternatively check PyPI, I'm sure there's something that will do what you
> want, but most of what you find will probably just use the Win32 package
> instead of reinventing the wheel.
> Regards,
> Liam Clarke
> -----Original Message-----
> From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
> Of wkranec at gmail.com
> Sent: Wednesday, 30 November 2005 8:59 a.m.
> To: tutor at python.org
> Subject: [Tutor] Read Excel file without COM
> Hi,
> I have written a script which reads a Microsoft Excel file and moves the
> data inside onto a database.  The script uses the PyWin32 module written by
> Mark Hammond, but I was wondering if anyone knew of a way to extract the
> data without using COM.  A Python module would be best, but I suppose any
> conversion program that could be called from Python would be satisfactory.
> Saving the file as .csv isn't really an option since there are multiple
> pages in the sheet, and the people sending the files have been somewhat
> "standardized" to send an Excel sheet.  I have thought briefly about using
> xml, but this would require me to rewrite a lot of my code, and I would
> like to avoid this unless there are some other good reasons to do so.
> I think I found a good resource at
> http://chicago.sourceforge.net/devel/docs/excel/, but it doesn't include
> any Python code.  Does anyone know of something similar for Python?
> Thanks,
> Bill
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> A new monthly electronic newsletter covering all aspects of MED's work is
> now available.  Subscribers can choose to receive news from any or all of
> seven categories, free of charge: Growth and Innovation, Strategic
> Directions, Energy and Resources, Business News, ICT, Consumer Issues and
> Tourism.  See http://news.business.govt.nz for more details.
> http://www.govt.nz - connecting you to New Zealand central & local
> government services
> Any opinions expressed in this message are not necessarily those of the
> Ministry of Economic Development. This message and any files transmitted
> with it are confidential and solely for the use of the intended recipient.
> If you are not the intended recipient or the person responsible for
> delivery to the intended recipient, be advised that you have received this
> message in error and that any use is strictly prohibited. Please contact
> the sender and delete the message and any attachment from your computer.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

More information about the Tutor mailing list