Hi there,
I have the below python code that was working via
Windows Task Scheduler on Windows 2000 Terminal
Server:
import os, commands
from win32com.client import Dispatch
myExcel.Workbooks.Add('C:/JD/billing/Billing-Report-'
+ str(today) + '.xls')
myExcel.Workbooks.Add('C:/JD/billing/macro.XLA
'C:\Python24\\test.xls')
> > myExcel.Workbooks.Add('C:\Python24\\macro.XLA')
>
> >
>
myExcel.ActiveWorkbook.SaveAs('C:\Python24\\test.xls')
>
> should read:
>
> > myExcel.Workbooks.Add('C:\\Python24\\test.xls')
> > myExcel.Workbooks.Add('C
le "C:\Python24\Lib\site-packages\win32com\client\dynamic.py", line 496, in
__getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: Excel.Application.Workbooks
Thanks,
JD
Tim Roberts <[EMAIL PROTECTED]> wrote:
Jd H wrote:
> Hello,
>
Hello,
I have the below python code which opens an excel sheet, runs a macro then
save the file. When run from python it runs perfectly. Code is below. File name
is test.py
<<<
from win32com.client import Dispatch
myExcel = Dispatch('Excel.Application')
myExcel.Visible = 1