This is a migrated thread and some comments may be shown as answers.

Grid-Export to Excel-.XLSX format

7 Answers 1016 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SANNIDHI
Top achievements
Rank 1
SANNIDHI asked on 08 Aug 2012, 05:41 AM
Hi,

         I implemented grid view-export to excel functionality in my application.
 
         By default it will take .xls  format..i need it to be .xlsx  format (2007 ).

         but when i added .xlsx file extension in my code..it is  unable to open that fiel

        please let me know the solution for this...

        Urggggent ..plzzzzzzz

Thanks,

7 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 08 Aug 2012, 06:06 AM
Hi,

Try setting the FileExtension property as shown below.
aspx:
<ExportSettings Excel-FileExtension=".xlsx" ExportOnlyData="true" OpenInNewWindow="true">
</ExportSettings>

Thanks,
Princy.
0
SANNIDHI
Top achievements
Rank 1
answered on 08 Aug 2012, 06:38 AM
Hi Princy,

                      Thank you for your reply...
                       It is not working..
                       following error msg displaying..plz find the attachment..

Thanks...
0
Kostadin
Telerik team
answered on 08 Aug 2012, 02:45 PM
Hi SANNIDHI,

Try our new Excel export format (in Q2 2012) which is based on a binary XLS (BIFF) format and is supported in all versions of Microsoft Office, starting from 2003. By default it exports the file in .xlsx format.
<ExportSettings ExportOnlyData="true" >
    <Excel Format="Biff"/>
</ExportSettings>

Regards,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
SANNIDHI
Top achievements
Rank 1
answered on 09 Aug 2012, 08:31 AM
Hi,


             How to do that in other way without using new version..

Thanks
0
Kostadin
Telerik team
answered on 09 Aug 2012, 10:46 AM
Hi SANNIDHI,

The only other possible solution is to re-save the file in the format that you like. Even if you change the extension manually Microsoft Office will detect the difference between the MIME type and the file content and will then add its own autodetected extension.

Greetings,
Kostadin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Meera
Top achievements
Rank 1
answered on 21 Aug 2012, 07:30 AM

Hi Kostadin,

I tried with 

myGrid.ExportSettings.Excel.Format = GridExcelExportFormat.Biff ;
myGrid.MasterTableView.ExportToExcel();

in((in Q2 2012) ) still it does not allow me downloading file in xlsx format.

 


Can you tell me if I am missing something?

Thanks,
0
Daniel
Telerik team
answered on 22 Aug 2012, 01:04 PM
Hello Meera,

The BIFF format is actually a binary XLS file and not XLSX. RadGrid does not support the latter, sorry for any inconvenience caused.

Regards,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
SANNIDHI
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
SANNIDHI
Top achievements
Rank 1
Kostadin
Telerik team
Meera
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or