Перетворити файл MPP Project Microsoft Project

У цій статті описано, як конвертувати файли MPP Project Microsoft у різні вихідні формати, включаючи HTML, звичайний текст та шаблон Microsoft Project (MPT) за допомогою Aspose.Tasks для .NET. API забезпечує вичерпний набір функцій для налаштування виходу, включаючи обробку ресурсів, налаштування заголовка, параметри стилізації та фільтрацію вмісту. Кожен формат охоплений практичними прикладами та додатковими етапами налаштування.

Microsoft Project (MSP) дозволяє розробникам зберігати дані проекту (MPP/XML) до HTML, тексту та шаблонів MPT. Aspose.tasks також дозволяє зберегти дані проекту в тих же форматах, подібних до MSP. Це досягається за допомогою стандартного методу збереження, викритий класом проектом.

Збережіть дані проекту як html

Клас HTMLSaveOptions дозволяє розробникам контролювати макет та вміст експортованих HTML -файлів. Він підтримує багатосторінковий експорт, конфігурацію розміру сторінки, вибір часового масштабу та вбудовуючи або зовнішні CSS, шрифти та зображення. Aspose.tasks може експортувати дані проекту у формат HTML. Це дозволяє зберегти всі дані на HTML або експортувати необхідні сторінки на HTML, використовуючи SaveOptions, як показано в наступних зразках коду.

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.