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
Jd H wrote:
> 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')
> my
Jd H wrote:
> 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')
> myEx
Jd H wrote:
> 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
>
What does "run from python" mean??
>
> <<<
>
What's that "<<<"?? If you meant to
Jd H wrote:
> I am posting test.py again below:
>
> <<<
> from win32com.client import Dispatch
>
> myExcel = Dispatch('Excel.Application')
> myExcel.Workbooks.Add('C:\Python24\\test.xls')
> myExcel.Workbooks.Add('C:\Python24\\macro.XLA')
That's still not right. It will work this time, until s
Why are you using Cygwin cron instead of native Windows Task Scheduler (Windows
version of cron-like scheduler)?
These lines:
> myExcel.Workbooks.Add('C:\Python24\\test.xls')
> myExcel.Workbooks.Add('C:\Python24\\macro.XLA')
> myExcel.ActiveWorkbook.SaveAs('C:\Python24\\test.xls')
should re
I am posting test.py again below:
<<<
from win32com.client import Dispatch
myExcel = Dispatch('Excel.Application')
myExcel.Workbooks.Add('C:\Python24\\test.xls')
myExcel.Workbooks.Add('C:\Python24\\macro.XLA')
myExcel.Run('Macro1')
myExcel.Application.DisplayAlerts = False
myExcel.Ac
I included an additional backslash and still same
error type below:
Traceback (most recent call last):
File "c:\Python24\test.py", line 4, in ?
myExcel.Workbooks.Add('C:\\Python24\\test.xls')
File
"C:\Python24\Lib\site-packages\win32com\client\dynamic.py",
line 496, in __getattr__
rais
bob gailer alum.rpi.edu> writes:
>
> Charlie wrote:
> > When launching a python script from a DOS console,
> > I can not find a way to leave the DOS console at a working directory
> > other than the initial working directory.
> >
> Why do you want to do this? Might there be other approach
Hi!
Try this:
import os
os.system('start "TITLE" "cmd /KCD /DD:\\Dev\\python"') #for dir:
D:\\Dev\\python
("TITLE" is the title (yes!) of the window)
@-salutations
Michel Claveau
___
python-win32 mailing list
[email protected]
htt
10 matches
Mail list logo