DEV Community

loading...

Export/Import Excel documents to MS Project in C#/.NET using Aspose.Tasks

panchenkodmaspose profile image panchenko-dm-aspose ・1 min read

Export MS Project data to XLSX

Sometimes there may be requirements to work with your project data in Microsoft Excel.
In simple scenarios, you can export project data using Aspose.Tasks with two lines of code (default settings will be used):

The resulting spreadsheet will contain three sheets (for Task, Resource, and Assignments) with default columns.
If you need a specific set of columns the resulting spreadsheet can be customized in the following way:


The resulting spreadsheet when opened in Microsoft Excel:
Alt Text

Import project data from XLSX

There is no API for importing XLSX to project data at the moment, but you can use OpenXml to implement an importing routine specific to your data. Here is a simplified example of how it can be done (requires ‘DocumentFormat.OpenXml‘ NuGet package ):

Discussion (1)

Collapse
srobert2 profile image
srobert2

Thank you for this article,
very interresting indeed.
An other tip: if you want to import actual work at assignment level you can also use Project Timesheet Pro


This is for desktop versions only
cheers,
Stéphane

Forem Open with the Forem app