Embedding objects( txt, doc) into excel using python
- From: Girish <girish.14@xxxxxxxxx>
- Date: 31 May 2007 01:23:40 -0700
Hi,
I want to embed a txt document into an excel using python.
Here is my code, but i get an error message
===================================================
Traceback (most recent call last):
File "C:\Documents and Settings\kusumap\Desktop\Girish.py", line 7,
in ?
work***.OLEObjects.Add(Filename="C:\Documents and Settings
\kusumap\My Documents\desktop.ini", Link=False,DisplayAsIcon=True,
IconFileName="packager.exe", IconIndex=0, IconLabel="C:\Documents and
Settings\kusumap\My Documents\desktop.ini").Select
AttributeError: 'function' object has no attribute 'Add'
===================================================
import win32com.client
ExcelApp = win32com.client.Dispatch("Excel.Application")
ExcelApp.visible = 1
workbook = ExcelApp.Workbooks.open("C:\Software\New Microsoft Excel
Work***.xls")
work*** = workbook.Active***
#work***.OLEObjects.Add(Filename="C:\Documents and Settings\p\My
Documents\desk.txt", Link=False,DisplayAsIcon=True,
IconFileName="packager.exe", IconIndex=0, IconLabel="C:\Documents and
Settings\p\My Documents\desk.txt").Select
Can anyone please whtz the problem with the code and how to overcome
the same.
Thanks
Girish S
.
- Follow-Ups:
- Re: Embedding objects( txt, doc) into excel using python
- From: Tim Golden
- Re: Embedding objects( txt, doc) into excel using python
- Prev by Date: Re: qt doevent
- Next by Date: Re: Usage of the __and__ method
- Previous by thread: qt doevent
- Next by thread: Re: Embedding objects( txt, doc) into excel using python
- Index(es):