Opening file in Excel
mhammond at skippinet.com.au
Thu Aug 22 04:34:07 CEST 2002
> "dsavitsk" <dsavitsk at e-coli.net> wrote in message news:<buT79.3072$yt3.1265418 at newssrv26.news.prodigy.com>...
>>have you tried using the whole file path? i.e. -> 'C:\\my\\path\\mytest.xls'
>>also, instead of throwing the file name at XL, see if the file exists first.
>>... lf.xlBook = self.xlApp.Workbooks.Open(filename)
> Sorry for the delayed response, an unexpected twist at work has kept
> me away from the computer.
> Yes, my original message included the line "Using the full path of the
> file results in the
> exact same thing." Here is a complete interactive session to show
> what I mean...
Maybe Excel doesnt like the forward slashes, or the spaces without
quotes, or the time of the day? Either way, it is unlikely to be a
Python specific issue - if you write a quick VBScript app with the same
hardcoded path name, I would expect to see it fail in the same way.
Experiment a little - try "c:\\test.xls", for example, and work back
More information about the Python-list