This tutorial explains how to create an MS Project WBS structure using Java. You will get details on setting up the development environment, a list of programming steps, and sample code to create a work breakdown structure WBS using Java. Code enhancements will also be shared to upgrade the code for creating a custom output MPP file with WBS.
Steps for Project Work Breakdown Structure using Java
- Set up the environment to use Aspose.Tasks for Java to create WBS
- Load the product license to create output in any supported format
- Create a blank project and define a custom WBS code format
- Add a mask for the WBS to define the numbering format for each level
- Create multiple tasks with a hierarchy in the newly created project
- Recalculate the project to regenerate WBS codes using the above configuration
- Save the project on the disk and load it again to display the WBS structure in the project
These steps summarize the process of working with the work breakdown structure using Java. Set the development environment, load the product license, create a blank project, and define a custom WBS code format with a mask. Finally, create multiple tasks in a defined hierarchy, recalculate the project to regenerate the WBS codes, and display the WBS structure for verification.
Code for Building a Work Breakdown Structure using Java
This code guides you on how to work with the project work breakdown using Java. Try the renumberWBSCode() method to regenerate the WBS code instead of recalculating the whole project, use multiple WBSCodeMask entries to display a unique numbering style for each hierarchy level, and use WBSSequence across levels such as uppercase or lowercase letters. You can also manually override the auto-generated codes for specific tasks using the Task.setWBS() and setWBSLevel().
This article teaches how to use WBS. To convert an MPP file to an Excel file, refer to the article Convert MPP to XLSX using Java.