[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 <[EMAIL PROTECTED]>
To: Ron Henderson <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
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
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32