C#讀取MS Project檔案

來源:互聯網
上載者:User

今天想做一個MS Project和SolidWorks EPDM整合的項目進度管理,剛開始做規劃,所以很多東西都不會。

希望大家多指點一下,有好的建議和意見都幫忙提一下。

不多說了。

先看Project 檔案的內容吧

下面是讀取任務名稱,開始時間,結束時間。還有其他幾項的代碼。(vb.net)

Public Class OpreateMpp    Public Sub ReadMpp()        Dim message As String        Dim missing As Object = Type.Missing        Dim prj As New ApplicationClass        prj.FileOpenEx("F:/項目1.mpp", False, missing, missing, missing, missing, missing, missing, missing, missing, missing, PjPoolOpen.pjPoolReadWrite, missing, missing, missing, missing)        For Each proj As Project In prj.Projects            For Each task As Task In proj.Tasks                message = message + "|" + task.Name.ToString + "|" + task.UniqueID.ToString + "|" + task.ResourceNames.ToString + "|" + task.Start.ToString + "|" + task.Finish.ToString + "|" + vbLf            Next        Next        prj.FileClose(PjSaveType.pjSave, False)        prj.Quit(PjSaveType.pjSave)        System.Console.Read()        MsgBox(message)    End SubEnd Class
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.