Docs
API
  • exportToExcel(params: Object)

    Exports data to Excel file.
    To generate Excel file, it is used SheetJS

    Requires to set property exporter: true

    By default it exports only visually displayed data.
    To export all data it requires to set property all: true.

    Example

    
    var grid = new FancyGrid({
      window: true,
      modal: true,
      exporter: true,
      ...
    });
    ...
    grid.exportToExcel();
    

    Example: Export all data

    
    grid.exportToExcel({
      all: true
    });
    

    Example: File Name

    
    grid.exportToExcel({
      fileName: 'My Excel'
    });
    

    Example: Without Header

    
    grid.exportToExcel({
      header: false
    });
    

    Example: Ingore column render methods

    
    grid.exportToExcel({
      ignoreRender: true
    });
    

    Example: Only rows with ids

    
    grid.exportToExcel({
      rowIds: [1, 3, 7]
    });
    

    See also

    Method exportToCSV
    Method getDataAsCSV

    Property exportFn
    Property exportable

    Doc link Export