Saving Project Data to Excel Format

This article shows how to save project data to XLSX format using Aspose.Tasks.

Saving Project Data to Excel Format

The Project class exposes the save method which is used to save a project in various formats. The save method allows you to save project tasks, resources and assignments to separate worksheets to XLSX format using the SaveFileFormat enumeration type.

To save a project to XLSX:

  1. Load a Microsoft Project file.
  2. Save the project to XLSX using SaveFileFormat.XLSX.

Saving a Project as XLSX

The following lines of code shows how to achieve this using Java

1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(SaveDataToExcel.class);
4
5// Read the input Project file
6Project project = new Project(dataDir + "Project5.mpp");
7
8project.save(dataDir + "Project1.XLSX", SaveFileFormat.XLSX);

Save Project Data to Spreadsheet2003 XML

There are two ways to save data to Spreadsheet2003 XML format: default, or using save options. Using the SaveFileFormat instance, the default view data is saved.

1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2// The path to the documents directory.
3String dataDir = Utils.getDataDir(SaveDataToExcel.class);
4Project project = new Project(dataDir + "Project5.mpp");
5project.save(dataDir + "Project5.xml", SaveFileFormat.Spreadsheet2003);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.