Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Issue related to Excel Export
posted

Iam Using the following snippet in order to show the Header breaked in the two Lines i.e.

{
headerText: "Total Planned Prod.<br/> Order (Qty.)", key: "OPTM_PLANNED_ORDER_QTY", dataType: "number", width: "7%", Type: "File Folder"

}

But the Problem I am Facing that when i Use

$.ig.GridExcelExporter.exportGrid($("#Grid"),{

fileName: "report"
worksheetName: 'XYZ Report',
columnsToSkip: [],

},

The <br/> used in the headers also get exported with the Heading, How can I remove it on export Time, also share the breaking line method in the Header Declaration section if is available, also have a doubt the 

columnsToSkip: [] property doesnt work for the column have proerty Hidden:"true" 

Because when using it the columns have such property was not skipping at export time

All this code Iam using for an Tree Grid, Plz Help me out

Parents
No Data
Reply
  • 16310
    Verified Answer
    Offline posted

    Hello Ashish,

    You can use the headerCellExporting callback to change the value being written to the header cell:


        $.ig.GridExcelExporter.exportGrid($("#treegrid2"), {}, {
         headerCellExporting: function(sender, args) {
          args.headerText = "new text";
         }
        });

    The columnsToSkip should be working for the column regardless of its hidden property. If you have any issues or trying to find how to achieve something, just tell us the scenario, so that I can suggest accordingly.

Children
No Data