Try this:
>>> import os
>>> os.getcwd()
'C:\\Python24'
I ran it from the interpreter. Dunno what it does from a script in an
arbitrary location. YMMV.
Cheers,
Cliff
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 20, 11:24 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> At Friday 20/10/2006 00:08, Johnny wrote:
>
> >doc.Workbooks.Open(excelFile, ReadOnly=True)
>
> >But the problem is when I only pass the filename to the Open()
> >method, and of course the file is in the current directory, it
At Friday 20/10/2006 00:08, Johnny wrote:
doc.Workbooks.Open(excelFile, ReadOnly=True)
But the problem is when I only pass the filename to the Open()
method, and of course the file is in the current directory, it will
throw an exception that the specified file can't be found. When I use
os.p
Hi,
As you know, I can use this to open an Excel file:
"""
import win32com.client
doc = win32com.client.Dispatch("Excel.Application")
doc.Workbooks.Open(excelFile, ReadOnly=True)
"""
But the problem is when I only pass the filename to the Open()
method, and of course the file is in the curr