You are viewing help content for pre-release software. This document and the features it describes are subject to change. Switch to the current version.

Office (Edit Rich Text & Spreadsheets)

  • 4 minutes to read

The Office Module integrates the following DevExpress controls into an XAF application:

You can see a demonstration of the Office Module in the Property Editors and Reports sections of the Feature Center demo installed in the %PUBLIC%\Documents\DevExpress Demos 21.2\Components.NET Core Desktop Libraries\eXpressApp Framework\FeatureCenter folder.

Office Module Capabilities

Rich Text Editor

The Office Module provides three platform-specific Property Editors:

  • the DevExpress.ExpressApp.Office.Win.RichTextPropertyEditor, which uses the RichEditControl in WinForms applications
  • the DevExpress.ExpressApp.Office.Web.ASPxRichTextPropertyEditor, which uses the ASPxRichEdit control in ASP.NET Web Forms applications
  • the DevExpress.ExpressApp.Office.Blazor.Editors.RichTextPropertyEditor, which uses the DxRichEdit component in ASP.NET Core Blazor applications

These editors allow end-users to edit rich text documents stored in different formats.

You can also create Mail Merge templates to generate documents based on data from your application database.

Note

ASP.NET Core Blazor applications do not support Mail Merge templates.

See Also

Spreadsheet Editor

The Office Module provides two platform-specific Property Editors:

  • the DevExpress.ExpressApp.Office.Win.SpreadsheetPropertyEditor, which uses the SpreadsheetControl in WinForms applications
  • the DevExpress.ExpressApp.Office.Web.ASPxSpreadsheetPropertyEditor, which uses the ASPxSpreadsheet control in ASP.NET Web Forms applications

These editors allow end-users to edit spreadsheet documents.

See Also

Office Module Components

Modules

Platform Module
platform-agnostic OfficeModule
WinForms OfficeWindowsFormsModule
ASP.NET Web Forms OfficeAspNetModule
ASP.NET Core Blazor OfficeBlazorModule

Application Model Extensions

The Office Module extends the Application Model with the following properties:

Module

Extended node

Extending node

Property

OfficeModule

IModelMember

IModelRichTextFormatSettings

DocumentStorageFormat

IModelMember

IModelSpreadsheetPropertyEditorSettings

EnableFormulaBar

OfficeWindowsFormsModule

IModelColumn

IModelRichTextColumn

CustomHeight

IModelPropertyEditor

IModelWinOfficeMenuManagerSettings

MenuManagerType

OfficeAspNetModule

IModelPropertyEditor

IModelWebRichTextPropertyEditorHeightSettings

CustomHeight

IModelPropertyEditor

IModelWebRichTextPropertyEditorSettings

MenuManagerType

IModelPropertyEditor

IModelWebSpreadsheetPropertyEditorSettings

CustomHeight

IModelPropertyEditor

IModelWebSpreadsheetPropertyEditorSettings

MenuManagerType

Add the Office Module to Your Application

Follow the steps below to add the Office Module to your application. If you added this Module when you created an XAF application, the Solution Wizard generates the following code automatically:

  1. Add the following NuGet packages:

    Package

    Project

    DevExpress.ExpressApp.Office

    platform-agnostic module project
    (MySolution.Module)

    DevExpress.ExpressApp.Office.Blazor

    Blazor-specific module project
    (MySolution.Blazor.Server)

    DevExpress.ExpressApp.Office.Win

    WinForms-specific module project
    (MySolution.Win)

    DevExpress.ExpressApp.Office.Web

    ASP.NET Web Forms-specific module project
    (MySolution.Web)

  2. In the application constructor, add the platform agnostic and platform-specific Office Modules to the Modules collection:

    WinForms
    File: MySolution.Win\WinApplication.cs.

    using DevExpress.ExpressApp.Office;
    using DevExpress.ExpressApp.Office.Win;
    // ...
    public partial class MySolutionWindowsFormsApplication : WinApplication {
        public MySolutionWindowsFormsApplication() {
            // ...
            Modules.Add(new OfficeModule());
            Modules.Add(new OfficeWindowsFormsModule());
        }
        // ...
    }
    

    ASP.NET Web Forms
    File: MySolution.Web\WebApplication.cs.

    using DevExpress.ExpressApp.Office;
    using DevExpress.ExpressApp.Office.Web;
    // ...
    public partial class MySolutionAspNetApplication : WebApplication {
        public MySolutionAspNetApplication() {
            // ...
            Modules.Add(new OfficeModule());
            Modules.Add(new OfficeAspNetModule());
        }
        // ...
    }
    

    ASP.NET Core Blazor
    File: MySolution.Blazor.Server\BlazorApplication.cs.

    using DevExpress.ExpressApp.Office;
    using DevExpress.ExpressApp.Office.Blazor;
    // ...
    public partial class MySolutionBlazorApplication : BlazorApplication {
        public MySolutionBlazorApplication() {
            // ...
            Modules.Add(new OfficeModule());
            Modules.Add(new OfficeBlazorModule());
        }
        // ...
    }
    

    Tip

  3. In ASP.NET Core Blazor applications, call AddXafOffice in the Startup.ConfigureServices method to register the required Office Module services in IServiceCollection:

    File: MySolution.Blazor.Server\Startup.cs.

    using DevExpress.ExpressApp.Office.Blazor;
    // ...
    public class Startup {
        // ...
        public void ConfigureServices(IServiceCollection services){
            //...
            services.AddXafOffice();
        }
        // ...
    }