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

Copy and Paste To and From Excel

3 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Inderpal
Top achievements
Rank 1
Inderpal asked on 28 Jun 2014, 06:02 AM
While  exporting data to Excel or CSV, height of row is auto. Our requirement is to expand width and height according to data available in cell mean user do not reuire to expand row height.

Please tell how to achieve this.

Currently we are taking data from grid and saving in excel with header.

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 01 Jul 2014, 01:23 PM
Hi,

Do you export the data with RadGridView.Export() method or do you copy and paste it?
In case you export the data, you can check the documentation on how to configure the ExportFormats.Html options. When pasting, you cannot control from RadGridView what the height of the rows after pasting in Excel will be.
 
Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Inderpal
Top achievements
Rank 1
answered on 02 Jul 2014, 12:09 PM
We  are using Export(ExportFormat.ExcelML);
0
Dimitrina
Telerik team
answered on 03 Jul 2014, 07:01 AM
Hello,

You can then check the ExportFormats.ExcelML options, however, their capacity are not as rich as the ExportFormats.Html. When exporting to HTML, there is also another alternative: you can style the exported data setting the e.Styles dictionary with proper CSS values when the ElementExporting is raised for the RadGridView. You can refer to the "Exporting" demo for an example. Unfortunately this option is not available for the ExcelML format.

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Inderpal
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Inderpal
Top achievements
Rank 1
Share this question
or