Last active
June 15, 2024 16:16
-
-
Save HoriLiu/18b85c21cb6884e6b5169cad0f7f70a9 to your computer and use it in GitHub Desktop.
Revisions
-
HoriLiu revised this gist
Jun 15, 2024 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,9 @@ import mpxj import pandas as pd #Ref FAQ for log4j2 in https://www.mpxj.org/faq/ jpype.startJVM("-Dlog4j2.loggerContextFactory=org.apache.logging.log4j.simple.SimpleLoggerContextFactory") #Ref https://pypi.org/project/mpxj/ from net.sf.mpxj.reader import UniversalProjectReader project = UniversalProjectReader().read('example.mpp') -
HoriLiu revised this gist
Jun 15, 2024 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import pandas as pd jpype.startJVM("-Dlog4j2.loggerContextFactory=org.apache.logging.log4j.simple.SimpleLoggerContextFactory") #Ref FAQ for log4j2 in https://www.mpxj.org/faq/ #Ref https://pypi.org/project/mpxj/ from net.sf.mpxj.reader import UniversalProjectReader project = UniversalProjectReader().read('example.mpp') -
HoriLiu renamed this gist
Jun 15, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
HoriLiu revised this gist
Jun 15, 2024 . No changes.There are no files selected for viewing
-
HoriLiu revised this gist
Jun 15, 2024 . 1 changed file with 25 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,25 @@ import jpype import mpxj import pandas as pd jpype.startJVM("-Dlog4j2.loggerContextFactory=org.apache.logging.log4j.simple.SimpleLoggerContextFactory") from net.sf.mpxj.reader import UniversalProjectReader project = UniversalProjectReader().read('example.mpp') # Extract relevant data data = [] print("Tasks") for task in project.getTasks(): if(task.getName()): print(task.getID().toString() + "\t" + task.getName()) data.append([task.getID().toString(), task.getName(), task.getDuration(), task.getStart(), task.getFinish()]) else: print(task.getID().toString() + "\t" + "Null") data.append([task.getID().toString()]) df = pd.DataFrame(data, columns=['ID', 'TaskName', 'WorkDuration', 'StartDate', 'EndDate']) # Save the data to Excel df.to_excel('WbsEst.xlsx', index=False) jpype.shutdownJVM() -
HoriLiu created this gist
Jun 15, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@