Genpact Cora Knowledge Center

Support

Known issue - Grid-XLSX-Export-502-AKS

V11.4 and earlier

Issue

Grid Export to XLSX Fails with 502 Bad Gateway (AKS Deployments).

Status Known issue — no code fix planned (deferred).
Applies to AKS-hosted environments only.

Problem

Exporting a grid to XLSX format from a form (via ShowExportToExcelButton with <Excel Format="Xlsx">) returns a 502 Bad Gateway error instead of downloading the file.

Root cause The Telerik grid control's XLSX export depends on WPF libraries that are not available on AKS deployments. This is a platform/library limitation, not an application bug and there is no code fix.
Scope Affects AKS-hosted environments only. Reproduces from both the Admin site and Portal. Non-AKS deployments are not affected.

Workarounds

Since XLSX export cannot be fixed on AKS, use one of the following export formats instead.

Option 1: Export to XLS (Biff format)

Use the legacy binary Excel format (BIFF) instead of XLSX:

<sq8:Grid runat="server" ID="Form1GridView" DataSourceID="Form1DataSource" ...>
  <MasterTableView DataKeyNames="fldId" DataSourceID="Form1DataSource" AutoGenerateColumns="False">
    <CommandItemSettings ShowExportToExcelButton="true"></CommandItemSettings>
    <AutoGeneratedEditColumnSettings ButtonType="ImageButton"></AutoGeneratedEditColumnSettings>
    <AutoGeneratedDeleteColumnSettings ButtonType="ImageButton"></AutoGeneratedDeleteColumnSettings>
    <Columns>
      ...
    </Columns>
  </MasterTableView>
  <ExportSettings FileName="myFile123" ExportOnlyData="true">
    <Excel Format="Biff"></Excel>
  </ExportSettings>
</sq8:Grid>

Key change: <Excel Format="Biff"> instead of <Excel Format="Xlsx">.

Option 2: Export to CSV

Replace the Excel export button with the CSV export button:

<sq8:Grid runat="server" ID="Form1GridView" DataSourceID="Form1DataSource" ...>
  <MasterTableView DataKeyNames="fldId" DataSourceID="Form1DataSource" AutoGenerateColumns="False">
    <CommandItemSettings ShowExportToCsvButton="true"></CommandItemSettings>
    <AutoGeneratedEditColumnSettings ButtonType="ImageButton"></AutoGeneratedEditColumnSettings>
    <AutoGeneratedDeleteColumnSettings ButtonType="ImageButton"></AutoGeneratedDeleteColumnSettings>
    <Columns>
      ...
    </Columns>
  </MasterTableView>
  <ExportSettings FileName="myFile123">
  </ExportSettings>
</sq8:Grid>

Key change: ShowExportToCsvButton="true" instead of ShowExportToExcelButton="true", and no <Excel> element needed.

Recommendation

  • If the consumer of the export needs a spreadsheet that opens directly in Excel, use Option 1 (Biff/XLS), closest to the original XLSX behavior.
  • If the export is for data interchange or the recipient doesn't need Excel-native formatting, use Option 2 (CSV), simplest and lightest.