Python COM -- What is the name of the file?

Mike Brenner mikeb at mitre.org
Tue Feb 26 10:29:36 EST 2002


Does anybody know how to get the name of the file an Excel Spreadsheet is in?

For example, to do a file-save-as in tab-delimited format, 
it is necessary to change "C:\data\stuff.xls"
to "C:\data\stuff.txt", but I don't know where to
get the "C:\data\stuff.xls" from in any given spreadsheet.

It would even be okay, if I could just get the name "stuff" from some part of the COM object.

(And, of course, hopefully the same technique will work in Microsoft Project, etc.)





More information about the Python-list mailing list