At 07:38 PM 9/22/2003, Kenneth Hutson wrote:
Hi,
I wonder if Python can connect to the object models exposed by Excel or Word.
Use Mark Hammond's win32all.
http://starship.python.net/crew/mham...Downloads.html
import win32com.client
app = win32com.client.Dispatch("word.application")
app.visible = 1
documents = self.app.Documents
doc = documents.Add("c:\\foo.doc")
etc.
app = win32com.client.Dispatch("excel.application")
app.visible = 1
app.WorkBooks.Open("c:\\foo.xls")
etc.
Bob Gailer
bg*****@alum.rpi.edu
303 442 2625
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003