Re: Default location while open an Excel file

2006-10-24 Thread J. Clifford Dyer
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

Re: Default location while open an Excel file

2006-10-19 Thread Johnny
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

Re: Default location while open an Excel file

2006-10-19 Thread Gabriel Genellina
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

Default location while open an Excel file

2006-10-19 Thread Johnny
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