Rendering Task Sheet View
In Microsoft Project, the Task Sheet view provides a tabular representation of tasks with their properties, resources, and scheduling details.
With Aspose.Tasks for .NET, you can render this view programmatically into formats like PDF, making it easy to share and archive project data.
Aspose.Tasks for .NET supports rendering project tasks to a variety of formats, such as PDF. Task sheets can be rendered using PresentationFormat of Aspose.Tasks for .NET API.
Understanding Task Sheet Rendering
Aspose.Tasks exposes the
PresentationFormat enumeration to define which project view should be exported.
When set to TaskSheet, the output contains a detailed task table similar to the one in Microsoft Project.
Supported output formats include:
- PDF (commonly used for reporting and archiving)
- TIFF, PNG, SVG, and other graphical formats (depending on settings in SaveOptions)
Steps to Render Task Sheet View
To render a project’s Task Sheet view:
- Create an instance of the Project class.
- Load the source MPP file.
- Configure a SaveOptions object with required Timescale settings.
- Set
PresentationFormat
to TaskSheet. - Save the project to PDF or another supported format.
Example: Rendering Task Sheet View to PDF
The following code sample demonstrates how to render an MPP file into a PDF Task Sheet view:
1Project project = new Project("New Project.mpp");
2
3// Set presentation format Task Sheet and save project as PDF
4SaveOptions options = new PdfSaveOptions();
5options.PresentationFormat = PresentationFormat.TaskSheet;
6project.Save("TaskSheetView_out.pdf", options);
Key Notes
- The Task Sheet view provides a concise tabular list of all tasks, their properties, and assigned resources.
- You can customize output using Timescale (Days, Weeks, Months) in
SaveOptions
. - Rendering supports both MPP and XML project formats.
- Exported PDF files preserve project layout and are suitable for printing or distribution.
FAQ
Q: Can I render only a specific part of the project?
- Yes. By configuring DateRange and Timescale in
SaveOptions
, you can restrict output to a particular time window.
Q: Does Aspose.Tasks require Microsoft Project installed to render views?
- No. Aspose.Tasks is a standalone API and does not depend on Microsoft Project.
Q: Can I export Task Sheet view to image formats?
- Yes. In addition to PDF, you can render to PNG, JPEG, BMP, TIFF, and SVG.