Last Updated: 11 Dec 2015 14:55 by ADMIN
Ivan Petrov
Created on: 20 Jul 2012 02:58
Category: GridView
Type: Feature Request
ADD. RadGridView - Export to Excel- Add ability to export into xls/xlsx file format.

The format of the file that ExportToExcelML creates is ExcelML which is an extended XML. If you do not want to receive the message, you have to change the extension of the file to ".xml". Even though the file will have an xml extension, it will still be associated with MS Excel and will be opened by Excel.There is a possibility to turn this warning message off on the client machine. You can read more about that on the following blog post - Excel 2007 Extension Warning On Opening Excel Workbook from a Web Site (

Another workaround is to use Interop to open the file and excel and save it in XLSX format. However, this would require Administrator or Power User  ( A reference from COM to the corresponding office version should be added. Here is the code for saving:

    ExportToExcelML exporter = new ExportToExcelML(this.radGridView1);

    exporter.ExportVisualSettings = true;

    string tempPath = Path.GetTempPath();

    tempPath += "tempgrid.xls";


    Microsoft.Office.Interop.Excel.Application app = new Microsoft.Office.Interop.Excel.Application();

    if (app == null)


        Console.WriteLine("EXCEL could not be started. Check that your office installation and project references are correct.");



    app.Visible = false;

    app.Interactive = false;

    Microsoft.Office.Interop.Excel.Workbook wb = app.Workbooks.Open(tempPath);

    string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

    desktopPath += "\\grid.xlsx";

    wb.SaveAs(desktopPath, Microsoft.Office.Interop.Excel.XlFileFormat.xlWorkbookDefault);





1 comment
Posted on: 01 Dec 2014 07:19
We have added ability to export to xlsx (and pdf, csv, txt) via RadSpreadProcessing ( Xls is not yet supported by the library, hence the SpreadExport does not support it. A request for xls support is available here: