Microsoft Project MPP 파일을 변환하십시오

이 기사에서는 Microsoft Project MPP 파일을 HTML, 일반 텍스트 및 .NET 용 Aspose.Tasks를 사용하여 MPT (Microsoft Project Template)를 포함한 다양한 출력 형식으로 변환하는 방법에 대해 설명합니다. API는 리소스 처리, 헤더 설정, 스타일링 옵션 및 컨텐츠 필터링을 포함하여 출력을 사용자 정의하기위한 포괄적 인 기능 세트를 제공합니다. 각 형식은 실제 예제 및 선택적 사용자 정의 단계로 다룹니다.

Microsoft Project (MSP)를 통해 개발자는 프로젝트 데이터 (MPP/XML)를 HTML, 텍스트 및 MPT 템플릿에 저장할 수 있습니다. Aspose.Tasks를 사용하면 MSP와 유사한 프로젝트 데이터를 동일한 형식으로 저장할 수 있습니다. 이것은 project 클래스에 노출 된 표준 저장 방법을 사용하여 달성됩니다.

프로젝트 데이터 저장으로 HTML

HTMLSaveOptions 클래스를 사용하면 개발자가 내보내는 HTML 파일의 레이아웃 및 내용을 제어 할 수 있습니다. 다중 페이지 내보내기, 페이지 크기 구성, 타임 스케일 선택, CSS, 글꼴 및 이미지 임베딩 또는 외부화를 지원합니다. Aspose.Tasks는 프로젝트 데이터를 HTML 형식으로 내보낼 수 있습니다. 다음 코드 샘플에 표시된대로 SaveOptions를 사용하여 모든 데이터를 HTML에 저장하거나 필요한 페이지를 HTML로 저장할 수 있습니다.

Controlling Header and Title Output in HTML

By default, the exported HTML document includes the project name in the HTML <title> and in the document’s page header. You can disable either of these elements by modifying the corresponding properties of the HtmlSaveOptions class.

Saving Fonts, Images and CSS Styles Separately

Aspose.Tasks supports saving fonts, images, and CSS styles as external files. This is particularly useful when you want to integrate HTML output into an existing website or manage styling separately from the content. This is achieved using the HtmlSaveOptions class by providing information about CSS, Font and Image destinations. The resource export behavior can be configured through HtmlSaveOptions.ExportFonts, ExportImages, and ExportCss.

Adding Custom Prefixes to CSS Class Names While Exporting to HTML

To avoid CSS class name conflicts when integrating the exported HTML into a broader application, you can define a custom prefix using the CssStylePrefix property.

Save Project to Text

Project data can be exported to plain text using SaveFileFormat.TXT. This format is intended for simple logging, debugging, or archival purposes.

Save Project Data as Template (MPT)

Aspose.Tasks allows saving a project as a Microsoft Project Template (MPT) file. This is useful when you want to create reusable project structures. Use the SaveAsTemplate method and configure optional parameters through the SaveTemplateOptions class to remove actual and baseline values.

Conclusion

Aspose.Tasks for .NET provides flexible and developer-friendly methods for exporting project data to multiple formats, including HTML, text, and templates. With the help of configuration classes such as HtmlSaveOptions and SaveTemplateOptions, developers can fine-tune the output to meet a wide range of business requirements. For additional details, refer to the API Reference or explore other export scenarios in the documentation.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.