Removing header when export to Excel

4 posts, 0 answers
  1. Paul
    Paul avatar
    15 posts
    Member since:
    Jan 2009

    Posted 17 Dec 2009 Link to this post

    I would like to remove page header, report header, and both footer while exporting to Excel. Is there a way to do this?
  2. Steve
    Steve avatar
    10940 posts

    Posted 18 Dec 2009 Link to this post

    Hi Paul,

    You cannot change the layout of a report or conditionally hide sections/items depending on the export format the report is rendered into. The excel export aims for a WYSIWYG representation of the report, and if you need only the report data than you can export to csv, where you can concentrate on the data only as shown in this KB article:Configuring the CSV Rendering Extension.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Manpreet
    Manpreet avatar
    5 posts
    Member since:
    Oct 2015

    Posted 16 Oct 2015 Link to this post

    Can we remove header and footer of the page using code behind file as we need excel format only and not the csv and that too without header and footers. Please help.
  4. Nasko
    Nasko avatar
    1086 posts

    Posted 20 Oct 2015 Link to this post

    Hello Manpreet,

    It is possible to modify the report definition before processing and rendering the report to XLSX. In this scenario you need to create the report object and modify its definition by removing the page header and page footer sections from the report items collection:
    var report = new MyReport();

    Additional information is available in the Programmatic Control of Reports help article.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top