Export to Excel :- How to Remove unnecessary columns

Posted by: Shalini89garg on 13 February 2018, 7:15 am EST

  • Posted 13 February 2018, 7:15 am EST

    In My Spread Js sheet , I do not want to export first two columns (one for serial number and other for check box) how can i achieve this.

    I am using gc.spread.sheets.all.11.0.0.min.js and gc.spread.excelio.11.0.0.min.js

    let excelIo = new GC.Spread.Excel.IO();

    var json = this.spread.toJSON({

    includeBindingSource: true,

    rowHeadersAsFrozenColumns: true,

    columnHeadersAsFrozenRows: true,

    ignoreFormula: false,

    ignoreStyle: false

    });

    let currentSheet = this.spread.getActiveSheet()

    excelIo.save(json, function (blob: any) {

    FileSaver.saveAs(blob, currentSheet );

    });

  • Posted 15 February 2018, 2:09 am EST

    Hi Shalini,

    I have answered your post here:

    https://www.grapecity.com/en/forums/spread-views/export-functionality-in-sp

    Please check and revert on same in case require further help.

    Thanks,

    Deepak Sharma

  • Posted 16 February 2018, 7:50 am EST

    Hello Deepak,

    while exporting in to Excel , how can i set the width of columns for auto fit width .

  • Posted 19 February 2018, 5:59 am EST

    Hello Shalini,

    You can call the ‘autoFitColumn()’ method for each column before exporting to excel. Please refer to the documentation given here:

    http://help.grapecity.com/spread/SpreadSheets11/webframe.html#autofit.html

    Thanks,

    Deepak Sharma

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels