[Tutor] how to read from an excel file?

Alan Gauld alan.gauld at btinternet.com
Mon Oct 22 00:37:46 CEST 2007


"pierre cutellic" <pierre.cutellic at gmail.com> wrote

> But i don't really know what are the next steps. I presume that it 
> should
> start by:
>
> import win32com.client
> xl = win32com.client.Dispatch("Excel.Application")

Before you try using COM to read the spreadsheet I'd consider
using some of the various Excel modules, like PyExcelerator.
(You need to download PyExcelerator its not a standard library
module. And there are at least 2 other modules for the same job...)

Or if possible, save the spreadsheet as a CSV file and use
the CSV module to process the data.

Both of these are likely to be easier than using COM.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list