[python-win32] [Fwd: Re: MSProject and export maps]

Tim Golden mail at timgolden.me.uk
Fri May 23 15:14:43 CEST 2008


[Sorry, copying back to list]

-------- Original Message --------
Subject: Re: [python-win32] MSProject and export maps
Date: Fri, 23 May 2008 14:14:24 +0100
From: Tim Golden <mail at timgolden.me.uk>
To: Ron Henderson <Ron.Henderson at dreamworks.com>
References: <BLU0-SMTP29E16760528DE270CA48C7A3C10 at phx.gbl> <483683F5.5030901 at timgolden.me.uk> <Pine.LNX.4.63.0805230608260.1666 at dunwoody.anim.dreamworks.com>

Ron Henderson wrote:
> 
> Can you confirm that the output is really a CVS (text) file?  When I 
> tried this the file that was written was still a binary .mpp file, i.e., 
> the FormatID was ignored.
> 
>> This works for me (I basically recorded a Macro and reproduced it):
>>
>> <code>
>> import win32com.client
>>
>> project = win32com.client.Dispatch ("MSProject.Application")
>> project.FileOpen ("c:/temp/p1.mpp")
>> project.FileSaveAs (Name="c:/temp/p2.csv", FormatID="MSProject.CSV", 
>> Map="p1")
>> project.FileClose (Save=0)
>> project.FileQuit ()
>>
>> </code>

I hadn't thought to check but, yes, it is:

<p2.csv>
Name,Actual_Cost
Do something,£0.00
</p2.csv>

Sorry not to be much more help; I'm not really an MS Project man myself.

TJG



More information about the python-win32 mailing list