1

I have not found where to set this setting. I have really tried, maybe it does not exist.

Cheers.

Jeff Fritz
  • 9,821
  • 7
  • 42
  • 52
Henkemota
  • 113
  • 2
  • 11

1 Answers1

1

There is a configuration option to handle this export formatting when you are using ExcelML export.

Configure the ExportSettings for your AJAX Grid similar to the following:

<ExportSettings ExportOnlyData="true" OpenInNewWindow="true" Excel-Format="ExcelML" />

Handle the OnExcelMLWorkBookCreated event, and you can set the papersize with the following property:

protected void grid_ExcelMLWorkBookCreated(object sender, Telerik.Web.UI.GridExcelBuilder.GridExcelMLWorkBookCreatedEventArgs e)
{
    e.WorkBook.Worksheets[0].WorksheetOptions.Print.PaperSize = System.Drawing.Printing.PaperKind.A4;
}

Here is a link to the RadGrid ExcelML Export documentation.

Jeff Fritz
  • 9,821
  • 7
  • 42
  • 52