[Tutor] Reading Excel

Finbarr O'Keeffe fok@mcrane.co.uk
Fri, 11 Oct 2002 14:47:10 +0100


 -----Original Message-----
Message: 7
From: "Lance" <lbrannma@cablespeed.com>
To: "Tutor" <tutor@python.org>
Date: Fri, 11 Oct 2002 05:21:38 -0700
Subject: [Tutor] Reading Excel

Hi All,

How might I read an Excel file using Python?

Thanks in advance.
Lance

Lance you could try the following code as a start. I would recommend Mark
Hammond & andy robinsons book "python programming on win32" which gives a
good introduction into this subject area:-

from win32com.client import Dispatch
from win32com.client import constants
app=Dispatch("Excel.Application")
app.Visible=1
app.Workbooks.Add()
app.Sheets(1).Cells(1,1).Value=str('sample cell data')


Regards

finbarr