Skip to main content

Office (Edit Rich Text & Spreadsheets)

  • 4 minutes to read

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

You can try out the Office Module in the Property Editors and Reports sections of the Feature Center demo installed to the following folder: %PUBLIC%\Documents\DevExpress Demos 24.1\Components\XAF\FeatureCenter.NETFramework.XPO.

Note

XAF does not support the Spreadsheet editor for ASP.NET Core Blazor applications.

Office Module Capabilities

Rich Text Editor

The Office Module provides three platform-specific Property Editors:

ASP.NET Core Blazor
DevExpress.ExpressApp.Office.Blazor.Editors.RichTextPropertyEditor that uses the DxRichEdit component.
Windows Forms
DevExpress.ExpressApp.Office.Win.RichTextPropertyEditor that uses RichEditControl.
ASP.NET Web Forms
DevExpress.ExpressApp.Office.Web.ASPxRichTextPropertyEditor that uses the ASPxRichEdit control.

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

ASP.NET Core Blazor
The RichTextPropertyEditor in an ASP.NET Core Blazor application
Windows Forms
The RichTextPropertyEditor in a WinForms application ASP.NET Web Forms The ASPxRichTextPropertyEditor in an ASP.NET Web Forms application

For information on how to access Rich Text Editor controls, refer to the following topic: How to: Access and Customize Rich Text Editor Controls.

Note

Both Blazor Rich Text Editor and DevExpress.ExpressApp.Office.Blazor.Editors.RichTextPropertyEditor do not support HTML format. If you need to use this format, create a ticket in our Support Center. Set the product field to ‘Blazor / Data Editors for Blazor’ and describe your requirements.

On Linux, the Office Module for Blazor may require additional libraries to be installed. For more information, refer to the following topic: Use Office File API on Linux - Prerequisites.

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

A Mail Merge template in a XAF application

Spreadsheet Editor

The Office Module provides two platform-specific Property Editors:

Windows Forms
DevExpress.ExpressApp.Office.Win.SpreadsheetPropertyEditor that uses SpreadsheetControl.
ASP.NET Web Forms
DevExpress.ExpressApp.Office.Web.ASPxSpreadsheetPropertyEditor that uses the ASPxSpreadsheet control.

These editors allow end-users to edit spreadsheet documents.

For information on how to access Spreadsheet controls, refer to the following topic: How to: Access the Spreadsheet Editor Controls.

Windows Forms
The SpreadsheetPropertyEditor in a WinForms application
ASP.NET Web Forms
The ASPxSpreadsheetPropertyEditor in an ASP.NET Web Forms application

Office Module Components

Modules

Platform Module NuGet package
platform-agnostic OfficeModule DevExpress.ExpressApp.Office
ASP.NET Core Blazor OfficeBlazorModule DevExpress.ExpressApp.Office.Blazor
Windows Forms OfficeWindowsFormsModule DevExpress.ExpressApp.Office.Win
ASP.NET Web Forms OfficeAspNetModule DevExpress.ExpressApp.Office.Web

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

Install the appropriate platform-specific NuGet package and use one of the following techniques to add the Office Module:

The following additional steps may be required:

ASP.NET Core Blazor Application Without Application Builder

Navigate to the MySolution.Blazor.Server\Startup.cs file and call the AddOffice method in the Startup.ConfigureServices method to register the Office Module services in IServiceCollection:

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