Copy and Paste To and From Excel

4 posts, 0 answers
  1. Inderpal
    Inderpal avatar
    6 posts
    Member since:
    Jun 2014

    Posted 28 Jun 2014 Link to this post

    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.
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 01 Jul 2014 Link to this post

    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.
     
  3. Inderpal
    Inderpal avatar
    6 posts
    Member since:
    Jun 2014

    Posted 02 Jul 2014 Link to this post

    We  are using Export(ExportFormat.ExcelML);
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 03 Jul 2014 Link to this post

    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.
     
Back to Top