msproject

Opens/Creates Microsoft Project file and edits project fields.
3,2K download
Aggiornato 20 apr 2004

Visualizza la licenza

MSPROJECT Opens/Creates MS Project file and edits project fields.

msproject(file)
msproject(file,Property,vars,Property,vars,Property,...)

file: Name of file with extension (ex. 'my_project.mpp')
Property,vars: Can be one of the following:

'Row',v1,v2 (v1) Integer to input row to be selected. or
'All' to select all rows. or
can be a string starts with '+' and an integer (ex.
'+12' which selects the current row in addition to
the next 12 rows).
(v2) Integer to input last row to indicate range (v1 to v2) to be selected. (optional)
'Find',v (v) String of characters to search in (Task Name) column.
'Insert',v (v) Integer to input number of rows to insert above selected row.
'Delete',v1,v2 (v1) Row ID number to be deleted. (optional)
(v2) will delete rows from (var1) to this row ID number. (optional)
* If v1 & v2 are not specified, then current row will
be deleted.
'Task Name',v (v) String to input the task name in selected row.
'Start',v (v) String to input date (ex. '12/12/2004') in selected row.
'Finish',v (v) String to input date (ex. '12/12/2004') in selected row.
'Duration',v (v) Integer to input number of days in selected row.
'Resource Names',v (v) String to input the resource names in selected row.
'Predecessors',v (v) Integer to input row number in selected row.
'Indent' Indent selected row(s).
'Outdent' Outdent selected row(s).
'StepDown',v (v) Integer to input number of rows to move cursor down.
'StepUp',v (v) Integer to input number of rows to move cursor up.
'Zoom',v (v) can be:
'all' to zoom entire range.
'selection' to zoom only selected row(s).
'1d','2d',...,'1mo','2mo',...'1y','2y',...
'Hide' * Hide Sub Tasks of Main selected row.
'Show' * Show Sub Tasks of Main selected row.

Example:

file = 'example.mpp';
msproject(file,'row',1,'task name','Main 1',...
'row',2,'task name','Main 2',...
'row',3,'task name','Main 3');

msproject(file,'find','Main 1','StepDown',1,'Insert',3,...
'find','Main 2','StepDown',1,'Insert',4,...
'find','Main 3','StepDown',1,'Insert',3);

msproject(file,'find','Main 1',...
'StepDown',1,'task name','Sub 1','Start','4/30/2005','Duration',5,...
'StepDown',1,'task name','Sub 2','Start','5/12/2005','Duration',2,...
'StepDown',1,'task name','Sub 3','Start','2/28/2005','Duration',7,...
'find','Main 2',...
'StepDown',1,'task name','Sub 1','Start','1/3/2005','Finish','1/9/2005',...
'StepDown',1,'task name','Sub 2','Start','6/17/2005','Finish','7/1/2005',...
'StepDown',1,'task name','Sub 3','Start','5/14/2005','Duration',2,...
'StepDown',1,'task name','Sub 4','Start','6/20/2005','Duration',7,...
'find','Main 3',...
'StepDown',1,'task name','Sub 1','Start','8/9/2005','Duration',1,...
'StepDown',1,'task name','Sub 2','Start','10/1/2005','Duration',20,...
'StepDown',1,'task name','Sub 3','Start','11/24/2005','Duration',3);

msproject(file,'find','Main 1','StepDown',1,...
'row','+2','Indent',...
'find','Main 2','StepDown',1,...
'row','+3','Indent',...
'find','Main 3','StepDown',1,...
'row','+2','Indent');

msproject(file,'row','all','Hide');
msproject(file,'row','all','Show');

msproject(file,'find','Main 2','StepDown',3,'Delete');
msproject(file,'Zoom','All');

Cita come

Fahad Al Mahmood (2024). msproject (https://www.mathworks.com/matlabcentral/fileexchange/4753-msproject), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R13
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Use COM Objects in MATLAB in Help Center e MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0

Hide & Show added + Updated Documentation & example