Grid export excel header

8 posts, 1 answers
  1. CORNEL
    CORNEL avatar
    44 posts
    Member since:
    Jan 2012

    Posted 25 May 2016 Link to this post

    Hi Guys,

     

    I'm wondering if would be possible to add a title/header to excel exported file from grid.

    Something similar to how the export to pdf shows a nice title on top of page.

    Is there any way to accomplish this?

     

    Cheers!

     

  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2308 posts

    Posted 25 May 2016 Link to this post

    Hello CORNEL,

    You could use the excelExport event handler of the Grid and prepend a row in the exported Workbook. Here is an example of this.

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. CORNEL
    CORNEL avatar
    44 posts
    Member since:
    Jan 2012

    Posted 25 May 2016 in reply to Dimiter Madjarov Link to this post

    Hi Dimiter,

     

    Thank you for the prompt reply!

    The solution looks intriguing. 

    Any pointers how to go about expanding the cell across multiple columns and centering the content to look more like a proper title/header ?

     

    Cheers!

  4. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2308 posts

    Posted 25 May 2016 Link to this post

    Hello CORNEL,

    This could be achieved by further customizing the options of the inserted cell:

    http://docs.telerik.com/kendo-ui/api/javascript/ooxml/workbook#configuration-sheets.rows.cells.colSpan

    http://docs.telerik.com/kendo-ui/api/javascript/ooxml/workbook#configuration-sheets.rows.cells.textAlign

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. CORNEL
    CORNEL avatar
    44 posts
    Member since:
    Jan 2012

    Posted 25 May 2016 in reply to Dimiter Madjarov Link to this post

    Hi Dimiter,

     

    Thank you very much for the pointers!

    It works flawlessly to create an excel report title.

     

    Cheers!

  6. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2308 posts

    Posted 27 May 2016 Link to this post

    Hello CORNEL,

    Thank you for the update. I am glad the issue is resolved.

    Regards,
    Dimiter Madjarov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. InnovasiTeam
    InnovasiTeam avatar
    3 posts
    Member since:
    Mar 2011

    Posted 19 Apr 2017 in reply to Dimiter Madjarov Link to this post

    Is there a way to do this for PDF exports, too?
  8. Alex Hajigeorgieva
    Admin
    Alex Hajigeorgieva avatar
    989 posts

    Posted 21 Apr 2017 Link to this post

    Hello Eric,

    You can add a custom header to the PDF exported Kendo UI Grid with the help of  a template as shown in the overview section at:

    http://docs.telerik.com/kendo-ui/controls/data-management/grid/pdf-export#page-template

    Kind Regards,
    Alex Hajigeorgieva
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top