Converti MPP in XLSX usando Java

This short guide describes how to convert MPP to XLSX using Java. It covers IDE setup, a step-by-step guide, and sample code to convert an MPP to Excel using Java. You will learn how to add columns and customize the resulting output Excel file.

Passaggi per convertire MPP in Excel usando Java

  1. Set the environment to use Aspose.Tasks for Java to convert MPP to XLSX.
  2. Apply a license to use the product without any limitation.
  3. Load the source MPP file into memory using the Project class.
  4. Configure the XlsxOptions object to customize the output XLSX file.
  5. Crea alcune colonne nel primo foglio XLSX usando la classe GanttChartColumn
  6. Instantiate the ResourceViewColumn object to add a custom column in the resources sheet.
  7. Add a notes column to the assignment sheet using the AssignmentViewColumn class.
  8. Salva il progetto risultante come file XLSX sul disco

The provided steps help convert Microsoft Project to Excel using Java. The process starts by loading the license, loading the source MPP file into memory, creating the XlsxOptions class object, and saving the resulting project file directly as an XLSX file using the default settings. Per aggiungere colonne personalizzate a diversi fogli nel file Excel di output, è possibile utilizzare GanttChartColumn, ResourceViewColumn e AssignmentViewColumn come mostrato nel codice di esempio fornito.

Codice per convertire MS Project in Excel usando Java

This code demonstrates how to convert a Microsoft Project file to Excel using Java. It is possible to use the setEncoding() method in XlsxOptions for a specific character encoding in the output Excel file. Furthermore, instead of creating the columns from scratch, you can try using getDefaultTaskSheetView() or getDefaultResourceSheetView() in ProjectView to access the default collection and add additional columns to that collection.

Questa breve guida ha mostrato il processo per trasformare un file MPP in un file XLSX. To set predecessor tasks in a project file, refer to the article Set predecessor in MS Project using Java.

 Italiano