Search results
Suggest a FeaturePDF

Excel Settings

The Excel export options provides properties to manage Excel document export behaviors. You can set the customization properties in the ExcelOptions. Refer to the following code snippet to initialize the ExcelOptions property.

writer.ExcelOptions = new ExcelOptions();

Excel document type

You can save the report to the required Excel version by setting the ExcelSaveType property.

writer.ExcelOptions.ExcelSaveType = BoldReports.Writer.ExcelVersion.Excel2013;

Excel document advance layout for merged cells

Eliminate the tiny columns, rows, and merged cells to provide clear readability and perform data manipulations by setting the LayoutOption as IgnoreCellMerge.

writer.ExcelOptions = new BoldReports.Writer.ExcelOptions()
{
    LayoutOption = BoldReports.Writer.ExcelLayoutOptions.IgnoreCellMerge
};

Protecting Excel document from editing

You can restrict the Excel document from editing by providing the ExcelSheetProtection or enabling the ReadOnlyRecommended properties.

writer.ExcelOptions.ReadOnlyRecommended = true;
writer.ExcelOptions.ExcelSheetProtection = Syncfusion.XlsIO.ExcelSheetProtection.DeletingColumns;

Change Excel export format

Allows you to change the default file format to any other file format using the ExcelSaveType properties.

writer.ExcelOptions.ExcelSaveType = ExcelVersion.Excel2013;

Password Protected Excel document

Allows you to protect the exported Excel document from unauthorized users by encrypting the document using the encryption password. The following code snippet explains how to encrypt the exported document with user-defined password.

writer.ExcelOptions = new BoldReports.Writer.ExcelOptions()
{
    PasswordToModify = "password",
    PasswordToOpen = "password"
};