Excel export in React Pivot Table component

24 Dec 202524 minutes to read

The Pivot Table component supports exporting pivot data to Excel and CSV file formats. This enables data sharing and analysis in spreadsheet applications such as Microsoft Excel, Google Sheets, and more. To enable the export functionality, inject the ExcelExport module into the Pivot Table and set the allowExcelExport property to true.

Export data to an Excel file

Pivot Table data can be exported to an Excel file (.xlsx format) while preserving all formatting and structure. This format is compatible with Microsoft Excel and other spreadsheet applications. To export the data to Excel, invoke the excelExport method.

The Pivot Table component can be exported to Excel format using options available in the toolbar. For more details, refer here.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject} from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]}/></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        pivotObj.excelExport();
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    pivotObj.excelExport();
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Export data to a CSV file

Pivot Table data can be exported to a plain text CSV file. The CSV format is lightweight and compatible with most spreadsheet and data analysis applications. To export the data to CSV, invoke the csvExport method.

The Pivot Table component can be exported to CSV format using options available in the toolbar. For more details, refer here.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        pivotObj.csvExport();
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    pivotObj.csvExport();
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Exporting multiple pivot tables

Multiple Pivot Tables can be exported to a single Excel file, allowing for side-by-side comparison on the same or different worksheets. Each Pivot Table must be rendered with a unique HTML element ID. For example, PivotTable1 for the first table and PivotTable2 for the second. To export both Pivot Tables to a single Excel file, provide their IDs in the pivotTableIds property of the excelExportProperties.

Exporting to the same worksheet

Data from multiple Pivot Tables can be organized in a single view by exporting them to the same worksheet. Set the multipleExport.type property to AppendToSheet in the excelExportProperties, which will append each Pivot Table to the same sheet.

To add visual separation between Pivot Tables, use the multipleExport.blankRows property to specify the number of blank rows to insert between them. This helps maintain readability when multiple Pivot Tables are added in a single worksheet. After configuring these options, call the excelExport method with the isMultipleExport parameter set to true.

By default, the multipleExport.blankRows property is set to 5 blank rows.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject} from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    let dataSourceSettings1 = {
        rows: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        columns: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Amount', caption: 'Sold Amount' }, { name: 'Sold', caption: 'Units Sold' }]
    };
    let pivotObj1;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className="col-md-9"> <PivotViewComponent ref={d => pivotObj1 = d} id='PivotView1' height={350} dataSourceSettings={dataSourceSettings1} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        let excelExportProperties = {
            multipleExport: { type: 'AppendToSheet', blankRows: 2 },
            pivotTableIds: ['PivotView', 'PivotView1']
        };
        pivotObj.excelExport(excelExportProperties, true);
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { ExcelExportProperties } from '@syncfusion/ej2-grids';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;
  let dataSourceSettings1: DataSourceSettingsModel = {
    rows: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    columns: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Amount', caption: 'Sold Amount' }, { name: 'Sold', caption: 'Units Sold' }]
  }
  let pivotObj1: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj1 = d} id='PivotView1' height={350} dataSourceSettings={dataSourceSettings1} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      multipleExport: { type: 'AppendToSheet', blankRows: 2 },
      pivotTableIds: ['PivotView', 'PivotView1']
    };
    pivotObj.excelExport(excelExportProperties, true);
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Exporting to a new worksheet

Multiple Pivot Tables can be organized into separate worksheets within a single Excel file for better structured data management. Set the multipleExport.type property to NewSheet in the excelExportProperties. Each Pivot Table will be exported to its own dedicated worksheet. After configuring these options, call the excelExport method with the isMultipleExport parameter set to true.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject} from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    let dataSourceSettings1 = {
        rows: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        columns: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Amount', caption: 'Sold Amount' }, { name: 'Sold', caption: 'Units Sold' }]
    };
    let pivotObj1;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className="col-md-9"> <PivotViewComponent ref={d => pivotObj1 = d} id='PivotView1' height={350} dataSourceSettings={dataSourceSettings1} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        let excelExportProperties = {
            multipleExport: { type: 'NewSheet' },
            pivotTableIds: ['PivotView', 'PivotView1']
        };
        pivotObj.excelExport(excelExportProperties, true);
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { ExcelExportProperties } from '@syncfusion/ej2-grids';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;
  let dataSourceSettings1: DataSourceSettingsModel = {
    rows: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    columns: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Amount', caption: 'Sold Amount' }, { name: 'Sold', caption: 'Units Sold' }]
  }
  let pivotObj1: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj1 = d} id='PivotView1' height={350} dataSourceSettings={dataSourceSettings1} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      multipleExport: { type: 'NewSheet' },
      pivotTableIds: ['PivotView', 'PivotView1']
    };
    pivotObj.excelExport(excelExportProperties, true);
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Customize the pivot report during export

Pivot Table report settings can be customized before exporting, such as applying filters, adding formatting, or performing drill-down and drill-up operations. These customizations are applied exclusively to the exported file and do not affect the Pivot Table UI. To customize the export behavior, use the beforeExport event, which is triggered before the export operation begins.

In the following example, the beforeExport event is used to expand all Pivot Table headers by setting the expandAll property to true. The generateGridData method is then called to obtain the updated pivotValues. The updated pivotValues are assigned to args.dataCollections for the export. Finally, expandAll is set to false again to restore the original state of the Pivot Table.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let pivotObj;

    let dataSourceSettings = {
        dataSource: pivotData,
        enableSorting: true,
        columns: [{ name: 'Year' }],
        values: [
            { name: 'Sold', caption: 'Units Sold' },
            { name: 'Amount', caption: 'Sold Amount' },
        ],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        expandAll: false,
        filters: []
    };

    function beforeExport(args) {
        // Store the drilledMembers here(row/column headers that has been expanded).
        let member = pivotObj.dataSourceSettings.drilledMembers;
        // Then apply expandAll to the pivot table settings to get all the data including child members.
        pivotObj.setProperties(
            { dataSourceSettings: { expandAll: true, drilledMembers: [] } },
            true
        );
        pivotObj.engineModule.generateGridData(pivotObj.dataSourceSettings, true);
        // Assign that retrieved data to the exporting here.
        args.dataCollections = [pivotObj.engineModule.pivotValues];
        // Then set false to expandAll and the stored members to the drilledMembers  to the pivot table settings to get back to the normal state.
        pivotObj.setProperties(
            { dataSourceSettings: { expandAll: false, drilledMembers: member } },
            true
        );
    }

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true} beforeExport={beforeExport.bind(this)}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, BeforeExportEventArgs } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';

function App() {
  let pivotObj: PivotViewComponent;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: pivotData as IDataSet[],
    enableSorting: true,
    columns: [{ name: 'Year' }],
    values: [
      { name: 'Sold', caption: 'Units Sold' },
      { name: 'Amount', caption: 'Sold Amount' },
    ],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    expandAll: false,
    filters: []
  }

  function beforeExport(args: BeforeExportEventArgs): void {
    // Store the drilledMembers here(row/column headers that has been expanded).
    let member = pivotObj.dataSourceSettings.drilledMembers;
    // Then apply expandAll to the pivot table settings to get all the data including child members.
    pivotObj.setProperties(
      { dataSourceSettings: { expandAll: true, drilledMembers: [] } },
      true
    );
    pivotObj.engineModule.generateGridData(pivotObj.dataSourceSettings, true);
    // Assign that retrieved data to the exporting here.
    args.dataCollections = [pivotObj.engineModule.pivotValues];
    // Then set false to expandAll and the stored members to the drilledMembers  to the pivot table settings to get back to the normal state.
    pivotObj.setProperties(
      { dataSourceSettings: { expandAll: false, drilledMembers: member } },
      true
    );
  }

  function btnClick(): void {
    pivotObj.excelExport();
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true} beforeExport={beforeExport.bind(this)}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);

};

export default App;
export let pivotData = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];
export let pivotData: Object[] = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];

Export with custom aggregates

The Pivot Table supports exporting data with custom calculations beyond the default options such as Sum, Count, or Average. Custom aggregates enable advanced analytical scenarios where standard calculations are insufficient.

To add custom aggregates, follow these steps:

  1. Define custom aggregate names using the localization option. These names will appear in the Pivot Table’s aggregation menu.
  2. Add the custom aggregation types to the aggregate menu during Pivot Table initialization using the dataBound event.
  3. Use the aggregateCellInfo event to specify the calculation logic for each custom type. This event is triggered for every aggregate cell, allowing you to apply your custom formulas.
  4. Finally, call the excelExport method to export the Pivot Table with all custom aggregations applied.

For detailed information about adding custom aggregation types, refer to the custom aggregation documentation.

The following example demonstrates how to add two custom aggregate types to the aggregate menu: CustomAggregateType 1, which calculates a weighted average, and CustomAggregateType 2, which calculates the percentage of the total.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject, FieldList } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
import { L10n } from '@syncfusion/ej2-base';

L10n.load({
    'en-US': {
        pivotview: {
            CustomAggregateType1: 'Custom Aggregate Type 1',
            CustomAggregateType2: 'Custom Aggregate Type 2',
        },
        pivotfieldlist: {
            CustomAggregateType1: 'Custom Aggregate Type 1',
            CustomAggregateType2: 'Custom Aggregate Type 2',
        }
    }
});
const SummaryType = [
    'Sum',
    'Count',
    'DistinctCount',
    'Avg',
    'CustomAggregateType1',
    'CustomAggregateType2'
];

function App() {
    let pivotObj;

    let dataSourceSettings = {
        dataSource: pivotData,
        expandAll: false,
        enableSorting: true,
        columns: [{ name: 'Year' }, { name: 'Quarter' }],
        values: [{ name: 'Sold', type: 'CustomAggregateType1' }, { name: 'Amount', type: 'CustomAggregateType2' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
    };

    function dataBound() {
        pivotObj.getAllSummaryType = function () {
            return SummaryType;
        };
        pivotObj.pivotFieldListModule.aggregateTypes = SummaryType;
        pivotObj.pivotFieldListModule.getAllSummaryType = function () {
            return SummaryType;
        };
    }
    function aggregateCell(args) {
        if (args.aggregateType === 'CustomAggregateType1') {
            args.value = args.value * 100;
        }
        if (args.aggregateType === 'CustomAggregateType2') {
            args.value = args.value / 100;
        }
    }

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9">
                <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
                    allowExcelExport={true} showFieldList={true} dataBound={dataBound.bind(this)} aggregateCellInfo={aggregateCell.bind(this)}>
                    <Inject services={[ExcelExport, FieldList]} />
                </PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, FieldList, AggregateEventArgs, AggregateTypes, SummaryTypes } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { L10n } from '@syncfusion/ej2-base';

L10n.load({
  'en-US': {
    pivotview: {
      CustomAggregateType1: 'Custom Aggregate Type 1',
      CustomAggregateType2: 'Custom Aggregate Type 2',
    },
    pivotfieldlist: {
      CustomAggregateType1: 'Custom Aggregate Type 1',
      CustomAggregateType2: 'Custom Aggregate Type 2',
    }
  }
});
const SummaryType: string[] = [
  'Sum',
  'Count',
  'DistinctCount',
  'Avg',
  'CustomAggregateType1',
  'CustomAggregateType2'
];

function App() {
  let pivotObj: PivotViewComponent;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    enableSorting: true,
    columns: [{ name: 'Year' }, { name: 'Quarter' }],
    values: [{ name: 'Sold', type: 'CustomAggregateType1' }, { name: 'Amount', type: 'CustomAggregateType2' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
  }

  function dataBound(): void {
    pivotObj.getAllSummaryType = function () {
      return SummaryType as AggregateTypes[];
    };
    pivotObj.pivotFieldListModule.aggregateTypes = SummaryType as AggregateTypes[];
    pivotObj.pivotFieldListModule.getAllSummaryType = function () {
      return SummaryType as AggregateTypes[];
    };
  }

  function aggregateCell(args: AggregateEventArgs): void {
    if (args.aggregateType === 'CustomAggregateType1' as SummaryTypes) {
      args.value = args.value as number * 100;
    }
    if (args.aggregateType === 'CustomAggregateType2' as SummaryTypes) {
      args.value = args.value as number / 100;
    }
  }

  function btnClick(): void {
    pivotObj.excelExport();
  }

  return (
    <div>
      <div className="col-md-9">
        <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
          allowExcelExport={true} showFieldList={true} dataBound={dataBound.bind(this)} aggregateCellInfo={aggregateCell.bind(this)}>
          <Inject services={[ExcelExport, FieldList]} />
        </PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);

};

export default App;
export let pivotData = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];
export let pivotData: Object[] = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];

Export with custom date format

The Pivot Table component allows applying custom date formatting to date-type fields added to the row and column axes. This formatting ensures consistency across both the rendered pivot table and the exported file. Custom date formatting can be applied by configuring the formatSettings property using the following steps:

  1. Set the name property to the target date field.
  2. Set the type property to date to identify the field as a date type.
  3. Set the format property to the desired date format pattern (for example, "EEE, MMM d, ''yy")

After configuration, call the excelExport method to export the Pivot Table with the applied formatting.

The following example demonstrates exporting a Pivot Table with a custom date format. The Date field uses the pattern "EEE, MMM d, ''yy", which displays dates in the format: day-of-the-week abbreviation, month abbreviation, day, and two-digit year (for example, Sun, May 8, ‘23).

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { Group_Data } from './datasource';
function App() {
    let pivotObj;

    let dataSourceSettings = {
        dataSource: Group_Data,
        expandAll: false,
        enableSorting: true,
        formatSettings: [{ name: 'Date', type: 'date', format: "EEE, MMM d, ''yy" }],
        rows: [{ name: 'Date' }],
        columns: [{ name: 'Product_Categories', caption: 'Product Categories' }],
        values: [{ name: 'Sold', caption: 'Unit Sold' },
        { name: 'Amount', caption: 'Sold Amount' }],
    };

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { Group_Data } from './datasource';

function App() {
  let pivotObj: PivotViewComponent;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: Group_Data as IDataSet[],
    expandAll: false,
    enableSorting: true,
    formatSettings: [{ name: 'Date', type: 'date', format: "EEE, MMM d, ''yy" }],
    rows: [{ name: 'Date' }],
    columns: [{ name: 'Product_Categories', caption: 'Product Categories' }],
    values: [{ name: 'Sold', caption: 'Unit Sold' },
    { name: 'Amount', caption: 'Sold Amount' }],
  }

  function btnClick(): void {
    pivotObj.excelExport();
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);

};

export default App;
var gData = [
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1001,
        'Sold': 2

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 3

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1003,
        'Sold': 5

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1004,
        'Sold': 1

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1005,
        'Sold': 1

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1007,
        'Sold': 2

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1008,
        'Sold': 1

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1009,
        'Sold': 3

    },
    {
        'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1003,
        'Sold': 3
    },
    {
        'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 4

    },
    {
        'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 1

    },
    {
        'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1004,
        'Sold': 3
    },
    {
        'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1005,
        'Sold': 2

    },
    {
        'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1006,
        'Sold': 4

    },
    {
        'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1008,
        'Sold': 8
    },
    {
        'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1009,
        'Sold': 1

    },
    {
        'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1010,
        'Sold': 6

    },
    {
        'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1002,
        'Sold': 8
    },
    {
        'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1002,
        'Sold': 8
    },
    {
        'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 8
    },
    {
        'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1001,
        'Sold': 4
    },
    {
        'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1001,
        'Sold': 4
    },
    {
        'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1001,
        'Sold': 4

    },
    {
        'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1005,
        'Sold': 2
    },
    {
        'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1005,
        'Sold': 2
    },
    {
        'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1005,
        'Sold': 2
    },
    {
        'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1004,
        'Sold': 1

    },
    {
        'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1010,
        'Sold': 2
    },
    {
        'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1004,
        'Sold': 1
    },
];

var Group_Data = getGroupData(gData);
function getGroupData(data) {
    var date;
    var products = ['', 'Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
    var amount = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2];
    for (var ln = 0, lt = data.length; ln < lt; ln++) {
        date = new Date(data[ln].Date.toString());
        data[ln].Date = date.toString();
        data[ln].Products = products[data[ln].Product_ID - 1000];
        data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
        data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
    }
    return data;
}
let gData: Object[] = [
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1001,
        'Sold': 2

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 3

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1003,
        'Sold': 5

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1004,
        'Sold': 1

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1005,
        'Sold': 1

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1007,
        'Sold': 2

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1008,
        'Sold': 1

    },
    {
        'Date': '1/1/2015 20:18:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1009,
        'Sold': 3

    },
    {
        'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1003,
        'Sold': 3
    },
    {
        'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 4

    },
    {
        'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 1

    },
    {
        'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1004,
        'Sold': 3
    },
    {
        'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1005,
        'Sold': 2

    },
    {
        'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1006,
        'Sold': 4

    },
    {
        'Date': '1/5/2015 20:19:15 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1008,
        'Sold': 8
    },
    {
        'Date': '2/2/2015 10:22:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1009,
        'Sold': 1

    },
    {
        'Date': '2/10/2015 10:23:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1010,
        'Sold': 6

    },
    {
        'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1002,
        'Sold': 8
    },
    {
        'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1002,
        'Sold': 8
    },
    {
        'Date': '2/20/2015 11:25:07 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1002,
        'Sold': 8
    },
    {
        'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1001,
        'Sold': 4
    },
    {
        'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1001,
        'Sold': 4
    },
    {
        'Date': '3/07/2015 05:11:50 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1001,
        'Sold': 4

    },
    {
        'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1005,
        'Sold': 2
    },
    {
        'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1005,
        'Sold': 2
    },
    {
        'Date': '3/13/2015 05:11:55 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1005,
        'Sold': 2
    },
    {
        'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Bikes',
        'Product_ID': 1004,
        'Sold': 1

    },
    {
        'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Clothings',
        'Product_ID': 1010,
        'Sold': 2
    },
    {
        'Date': '9/1/2015 04:14:43 GMT+0530 (India Standard Time)',
        'Product_Categories': 'Accessories',
        'Product_ID': 1004,
        'Sold': 1
    },
];

export let Group_Data: Object[] = getGroupData(gData);

function getGroupData(data: any): Object[] {
    let date: Date;
    let products: string[] = ['Bottles and Cages', 'Cleaners', 'Fenders', 'Mountain Bikes', 'Road Bikes', 'Touring Bikes', 'Gloves', 'Jerseys', 'Shorts', 'Vests'];
    let amount: number[] = [0, 2, 3, 8, 60, 75, 65, 3, 5, 4, 2]
    for (let ln: number = 0, lt: number = data.length; ln < lt; ln++) {
        date = new Date(data[ln].Date.toString());
        data[ln].Date = date.toString();
        data[ln].Products = products[data[ln].Product_ID - 1000];
        data[ln].Sold = data[ln].Sold * (date.getFullYear() === 2015 ? 3 : date.getFullYear() === 2016 ? 4 : date.getFullYear() === 2017 ? 2 : 5);
        data[ln].Amount = ((date.getFullYear() === 2018 ? 2 : 0) + data[ln].Sold) * amount[data[ln].Product_ID - 1000];
    }
    return data as Object[];
}

Remove row header during export

Row headers can be excluded from the exported Excel file when only values and column headers are required. To achieve this, use the beforeExport event to access pivot values through args.dataCollections and remove the row headers before exporting.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let pivotObj;

    let dataSourceSettings = {
        dataSource: pivotData,
        columns: [{ name: 'Year' }, { name: 'Quarter' }],
        values: [{ name: 'Sold' }],
        rows: [{ name: 'Country' }, { name: 'Products' }]
    };

    function beforeExport(args) {
        for (var i = 0; i < args.dataCollections.length; i++) {
            var pivotValue = args.dataCollections[i];
            for (var j = 0; j < pivotValue.length; j++) {
                var row = pivotValue[j];
                if (row) {
                    pivotValue[j] = row.filter(function (item) {
                        return item !== null && (item.axis !== 'row');
                    });
                }
            }
        }
    }

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true} beforeExport={beforeExport.bind(this)}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, BeforeExportEventArgs, IAxisSet } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';

function App() {
  let pivotObj: PivotViewComponent;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: pivotData as IDataSet[],
    columns: [{ name: 'Year' }, { name: 'Quarter' }],
    values: [{ name: 'Sold' }],
    rows: [{ name: 'Country' }, { name: 'Products' }]
  }

  function beforeExport(args: BeforeExportEventArgs): void {
    for (let i: number = 0; i < args.dataCollections.length; i++) {
      const pivotValue: IAxisSet[] = args.dataCollections[i];
      for (let j: number = 0; j < pivotValue.length; j++) {
        const row: any = pivotValue[j];
        pivotValue[j] = row.filter((item: any) => {
          return item !== null && (item.axis !== 'row');
        });
      }
    }
  }

  function btnClick(): void {
    pivotObj.excelExport();
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true} beforeExport={beforeExport.bind(this)}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);

};

export default App;
export let pivotData = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];
export let pivotData: Object[] = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];

Exclude hidden columns during export

By default, all columns in the Pivot Table, including hidden ones, are exported. To exclude hidden columns, set the includeHiddenColumn property to false in excelExportProperties.

To hide a column, use the columnRender event in gridSettings to set the visible property of the target column to false. For more information, see the Hide Specific Columns in Pivot Table documentation.

After hiding the columns, set includeHiddenColumn to false in excelExportProperties to exclude them from the exported file. The exported file will then match the column structure shown in the Pivot Table UI.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let pivotObj;

    let dataSourceSettings = {
        dataSource: pivotData,
        expandAll: false,
        enableSorting: true,
        columns: [{ name: 'Year' }, { name: 'Quarter' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
        rows: [{ name: 'Country' }, { name: 'Products' }]
    };

    let gridSettings = {
        columnRender: function (args) {
            // Specific column(s) can be hidden by checking their level name and setting its visible property accordingly.
            for (let i = 1; i < args.columns.length; i++) {
                if (args.stackedColumns[i].customAttributes &&
                    args.stackedColumns[i].customAttributes.cell.valueSort.levelName === 'FY 2016.Units Sold') {
                    args.stackedColumns[i].visible = false;
                }
            }
        }
    };

    function btnClick() {
        let excelExportProperties = {
            includeHiddenColumn: false
        };
        pivotObj.excelExport(excelExportProperties);
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
                allowExcelExport={true} gridSettings={gridSettings}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, ExcelExportProperties } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { GridSettings } from '@syncfusion/ej2-pivotview/src/pivotview/model/gridsettings';

function App() {
  let pivotObj: PivotViewComponent;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    enableSorting: true,
    columns: [{ name: 'Year' }, { name: 'Quarter' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
    rows: [{ name: 'Country' }, { name: 'Products' }]
  }

  let gridSettings: GridSettings = {
    columnRender: function (args: any) {
      // Specific column(s) can be hidden by checking their level name and setting its visible property accordingly.
      for (let i = 1; i < args.columns.length; i++) {
        if (args.stackedColumns[i].customAttributes &&
          args.stackedColumns[i].customAttributes.cell.valueSort.levelName === 'FY 2016.Units Sold') {
          args.stackedColumns[i].visible = false;
        }
      }
    }
  } as GridSettings;

  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      includeHiddenColumn: false
    };
    pivotObj.excelExport(excelExportProperties);
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350}
        dataSourceSettings={dataSourceSettings} allowExcelExport={true} gridSettings={gridSettings}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);
};

export default App;
export let pivotData = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];
export let pivotData: Object[] = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];

Rotate cell text during export

The style of each cell in the exported file can be customized, including rotating text, changing background colors, and applying other visual modifications. This approach is useful for creating visually distinct Pivot Table and for fitting text within limited space.

To rotate text, use the following events:

  • excelHeaderQueryCellInfo: Triggered for column headers. This event is used to customize column header cell styles.
  • excelQueryCellInfo: Triggered for row and value cells. This event is used to customize row header and value cell styles.

Within these events, set the rotation property in the style argument to rotate the text to the desired angle.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
import { DropDownListComponent } from '@syncfusion/ej2-react-dropdowns';

function App() {
    let pivotObj;
    const degree = [90, 135, 180, 270];
    let dropDownListObject;
    let dataSourceSettings = {
        dataSource: pivotData,
        columns: [{ name: 'Year' }],
        values: [{ name: 'Sold' }],
        rows: [{ name: 'Country' }, { name: 'Products' }]
    };

    let gridSettings = {
        excelHeaderQueryCellInfo: function (args) {
            args.style = { rotation: dropDownListObject.value };
        },
        excelQueryCellInfo: function (args) {
            args.style = { rotation: dropDownListObject.value };
        }
    };

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350}
                dataSourceSettings={dataSourceSettings} allowExcelExport={true} gridSettings={gridSettings}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <div id="excel">
                    <ButtonComponent cssClass='e-primary' onClick={btnClick}>Export</ButtonComponent>
                </div>
                <div id="dropdownlist" style=>
                    <label>Select a degree: </label>
                    <DropDownListComponent style= placeholder="Select a degree" id="ddlelement"
                        dataSource={degree} ref={(scope) => { dropDownListObject = scope; }} width={150}>
                    </DropDownListComponent>
                </div>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { GridSettings } from '@syncfusion/ej2-pivotview/src/pivotview/model/gridsettings';
import { DropDownListComponent } from '@syncfusion/ej2-react-dropdowns';

function App() {
  let pivotObj: PivotViewComponent;
  const degree: number[] = [90, 135, 180, 270];
  let dropDownListObject: any;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: pivotData as IDataSet[],
    columns: [{ name: 'Year' }],
    values: [{ name: 'Sold' }],
    rows: [{ name: 'Country' }, { name: 'Products' }]
  }

  let gridSettings: GridSettings = {
    excelHeaderQueryCellInfo: function (args: ExcelHeaderQueryCellInfoEventArgs): void {
      args.style = { rotation: dropDownListObject.value as number };
    },
    excelQueryCellInfo: function (args: ExcelQueryCellInfoEventArgs): void {
      args.style = { rotation: dropDownListObject.value as number };
    }
  } as GridSettings;

  function btnClick(): void {
    pivotObj.excelExport();
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350}
        dataSourceSettings={dataSourceSettings} allowExcelExport={true} gridSettings={gridSettings}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <div id="excel">
          <ButtonComponent cssClass='e-primary' onClick={btnClick}>Export</ButtonComponent>
        </div>
        <div id="dropdownlist" style=>
          <label>Select a degree: </label>
          <DropDownListComponent style= placeholder="Select a degree" id="ddlelement"
            dataSource={degree} ref={(scope) => { dropDownListObject = scope; }} width={150}>
          </DropDownListComponent>
        </div>
      </div>
    </div>);
};

export default App;
export let pivotData = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];
export let pivotData: Object[] = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];

Apply custom styles based on specific conditions

When exporting Pivot Table data to Excel, custom styles can be applied to cells based on their values or other criteria. To apply custom styles, use the excelQueryCellInfo event. In this event, the cell information can be accessed through the args.cell property, and its style properties, such as backColor, fontName, and fontColor, can be customized.

The following example demonstrates how to apply conditional formatting to the Sold field values in the exported Excel document. Values below 700 units are highlighted in red, while values of 700 units or more are highlighted in green.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let pivotObj;

    let dataSourceSettings = {
        dataSource: pivotData,
        expandAll: false,
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
    };

    let gridSettings = {
        excelQueryCellInfo: function (args) {
            if (args.cell && args.cell.actualText === 'Sold') {
                if (args.value < 700) {
                    args.style = {
                        backColor: '#df3800',
                        fontName: 'Biome',
                        fontColor: '#FFFFFF',
                        borders: { color: '#8B1E00', lineStyle: 'thin' }
                    };
                }
                else {
                    args.style = {
                        backColor: '#00A45A',
                        fontName: 'Nirmala UI',
                        fontColor: '#FFFFFF',
                        borders: { color: '#00663A', lineStyle: 'thin' }
                    };
                }
            }
        }
    };

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
                allowExcelExport={true} gridSettings={gridSettings}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { GridSettings } from '@syncfusion/ej2-pivotview/src/pivotview/model/gridsettings';

function App() {
  let pivotObj: PivotViewComponent;

  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
  }

  let gridSettings: GridSettings = {
    excelQueryCellInfo: function (args: ExcelQueryCellInfoEventArgs): void {
      if (args.cell && (args.cell as any).actualText === 'Sold') {
        if ((args as any).value < 700) {
          args.style = {
            backColor: '#df3800',
            fontName: 'Biome',
            fontColor: '#FFFFFF',
            borders: { color: '#8B1E00', lineStyle: 'thin' }
          };
        } else {
          args.style = {
            backColor: '#00A45A',
            fontName: 'Nirmala UI',
            fontColor: '#FFFFFF',
            borders: { color: '#00663A', lineStyle: 'thin' }
          };
        }
      }
    }
  } as GridSettings;

  function btnClick(): void {
    pivotObj.excelExport();
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
        allowExcelExport={true} gridSettings={gridSettings}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);

};

export default App;
export let pivotData = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];
export let pivotData: Object[] = [
    {
        Sold: 25,
        Amount: 42600,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 46008,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 31,
        Amount: 52824,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 139412,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 35,
        Amount: 52470,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 117576,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 127800,
        Country: 'France',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 48,
        Amount: 71957,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 57,
        Amount: 85448,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 37480,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 28,
        Amount: 41977,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'France',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 91,
        Amount: 145190.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 24,
        Amount: 38292,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 100,
        Amount: 159550,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 30,
        Amount: 47865,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 89,
        Amount: 141999.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 25,
        Amount: 39887.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 42,
        Amount: 67011,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 74,
        Amount: 126096,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 69,
        Amount: 110089.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 52,
        Amount: 82966,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 49460.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 52651.5,
        Country: 'France',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 61464,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 64,
        Amount: 102112,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 57,
        Amount: 97128,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 76,
        Amount: 129504,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 33,
        Amount: 56232,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 81,
        Amount: 138024,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 65,
        Amount: 110760,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 70458,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 16,
        Amount: 27264,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 120984,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 61344,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 39,
        Amount: 58466,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 59,
        Amount: 100536,
        Country: 'Germany',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 19,
        Amount: 28486,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 26,
        Amount: 38979,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 15,
        Amount: 22490,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 13,
        Amount: 20741.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 79,
        Amount: 118426,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 14,
        Amount: 20991,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 50971,
        Country: 'Germany',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 47,
        Amount: 74988.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 93,
        Amount: 148381.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 15,
        Amount: 23932.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 48,
        Amount: 76584,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 44,
        Amount: 70202,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 59,
        Amount: 94134.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 77,
        Amount: 131208,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 84,
        Amount: 143136,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 56,
        Amount: 95424,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 35,
        Amount: 55842.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'Germany',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 90,
        Amount: 153360,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 68160,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 24,
        Amount: 40896,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 31,
        Amount: 46474,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 92,
        Amount: 156768,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 14,
        Amount: 23856,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 161880,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 51,
        Amount: 86904,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 39,
        Amount: 66456,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 36,
        Amount: 53969,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 86,
        Amount: 128919,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 96,
        Amount: 163584,
        Country: 'United Kingdom',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 24,
        Amount: 35981,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 97,
        Amount: 145408,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 69,
        Amount: 103436,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 30,
        Amount: 44975,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 95,
        Amount: 142410,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 11,
        Amount: 16494,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 27,
        Amount: 40478,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 68,
        Amount: 101937,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 45,
        Amount: 67460,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 16,
        Amount: 23989,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 40,
        Amount: 59965,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 18,
        Amount: 26987,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 43,
        Amount: 73272,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 83,
        Amount: 124422,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 52,
        Amount: 88608,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 91,
        Amount: 155064,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 100,
        Amount: 149905,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 70,
        Amount: 104935,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 37,
        Amount: 63048,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 69864,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 99,
        Amount: 148406,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 67,
        Amount: 114168,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 41,
        Amount: 65415.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 81,
        Amount: 121424,
        Country: 'United States',
        Products: 'Road Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 20,
        Amount: 29985,
        Country: 'United Kingdom',
        Products: 'Road Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 85,
        Amount: 144840,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 83496,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 23,
        Amount: 39192,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 34,
        Amount: 54247,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 53,
        Amount: 90312,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 82,
        Amount: 130831,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q1',
    },
    {
        Sold: 60,
        Amount: 95730,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 71,
        Amount: 113280.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q2',
    },
    {
        Sold: 25,
        Amount: 42600,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 28,
        Amount: 47712,
        Country: 'United States',
        Products: 'Mountain Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 21,
        Amount: 33505.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2015',
        Quarter: 'Q3',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 49,
        Amount: 78179.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 50,
        Amount: 79775,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q2',
    },
    {
        Sold: 56,
        Amount: 89348,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 40,
        Amount: 63820,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q1',
    },
    {
        Sold: 75,
        Amount: 119662.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q2',
    },
    {
        Sold: 94,
        Amount: 149977,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 80,
        Amount: 127640,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 54,
        Amount: 86157,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 14,
        Amount: 22337,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q3',
    },
    {
        Sold: 17,
        Amount: 27123.5,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2016',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q1',
    },
    {
        Sold: 76,
        Amount: 121258,
        Country: 'United States',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
    {
        Sold: 45,
        Amount: 71797.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2018',
        Quarter: 'Q1',
    },
    {
        Sold: 11,
        Amount: 17550.5,
        Country: 'United Kingdom',
        Products: 'Touring Bikes',
        Year: 'FY 2017',
        Quarter: 'Q4',
    },
];

Changing the Pivot Table style while exporting

The Excel export provides an option to change colors for headers, caption, and records in Pivot Table before exporting. To apply colors, define theme settings in excelExportProperties object and pass it as a parameter to the excelExport method.

By default, material theme is applied to exported Excel document.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        let excelExportProperties = {
            theme: {
                header: { fontName: 'Segoe UI', fontColor: '#666666' },
                record: { fontName: 'Segoe UI', fontColor: '#666666' },
                caption: { fontName: 'Segoe UI', fontColor: '#666666' }
            }
        };
        pivotObj.excelExport(excelExportProperties);
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { ExcelExportProperties } from '@syncfusion/ej2-grids';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      theme:
      {
        header: { fontName: 'Segoe UI', fontColor: '#666666' },
        record: { fontName: 'Segoe UI', fontColor: '#666666' },
        caption: { fontName: 'Segoe UI', fontColor: '#666666' }
      }
    };
    pivotObj.excelExport(excelExportProperties);
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

The Excel export provides an option to include header and footer content for the Excel document before exporting. To add header and footer, define header and footer properties in excelExportProperties object and pass it as a parameter to the excelExport method.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        let excelExportProperties = {
            header: {
                headerRows: 2,
                rows: [
                    { cells: [{ colSpan: 4, value: "Pivot Table", style: { fontColor: '#C67878', fontSize: 20, hAlign: 'Center', bold: true, underline: true } }] }
                ]
            },
            footer: {
                footerRows: 4,
                rows: [
                    { cells: [{ colSpan: 4, value: "Thank you for your business!", style: { hAlign: 'Center', bold: true } }] },
                    { cells: [{ colSpan: 4, value: "!Visit Again!", style: { hAlign: 'Center', bold: true } }] }
                ]
            }
        };
        pivotObj.excelExport(excelExportProperties);
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { ExcelExportProperties } from '@syncfusion/ej2-grids';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);


  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      header: {
        headerRows: 2,
        rows: [
          { cells: [{ colSpan: 4, value: "Pivot Table", style: { fontColor: '#C67878', fontSize: 20, hAlign: 'Center', bold: true, underline: true } }] }
        ]
      },
      footer: {
        footerRows: 4,
        rows: [
          { cells: [{ colSpan: 4, value: "Thank you for your business!", style: { hAlign: 'Center', bold: true } }] },
          { cells: [{ colSpan: 4, value: "!Visit Again!", style: { hAlign: 'Center', bold: true } }] }
        ]
      }
    };
    pivotObj.excelExport(excelExportProperties);
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Changing the file name while exporting

This option provides flexibility to specify a custom file name for your exported Excel document, making it easier to organize and identify your exported data files. The Excel export provides an option to change the file name of the document before exporting. To change the file name, define the fileName property in the excelExportProperties object and pass it as a parameter to the excelExport method.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        let excelExportProperties = {
            fileName: 'sample.xlsx'
        };
        pivotObj.excelExport(excelExportProperties);
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';
import { ExcelExportProperties } from '@syncfusion/ej2-grids';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      fileName: 'sample.xlsx'
    };
    pivotObj.excelExport(excelExportProperties);
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Show spinner during export

When exporting data, displaying a spinner provides visual feedback to end users that the export process is in progress. To show a spinner, invoke the showWaitingPopup method in the button’s click event before calling the export method. After the export is complete, use the exportComplete event to trigger the hideWaitingPopup method, which will hide the spinner and indicate that the export has finished successfully.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';

function App() {
    let pivotObj;
    var names = ['TOM', 'Hawk', 'Jon', 'Chandler', 'Monica', 'Rachel', 'Phoebe', 'Gunther',
        'Ross', 'Geller', 'Joey', 'Bing', 'Tribbiani', 'Janice', 'Bong', 'Perk', 'Green', 'Ken', 'Adams'];
    var city = ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Philadelphia', 'Phoenix', 'San Antonio', 'Austin',
        'San Francisco', 'Columbus', 'Washington', 'Portland', 'Oklahoma', 'Las Vegas', 'Virginia', 'St. Louis', 'Birmingham'];
    var hours = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    var rating = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    var designation = ['Manager', 'Engineer 1', 'Engineer 2', 'Developer', 'Tester'];
    var status = ['Completed', 'Open', 'In Progress', 'Review', 'Testing'];
    var time = 0;
    var data = function (count) {
        var result = [];
        for (var i = 0; i < count; i++) {
            result.push({
                TaskID: i + 1,
                Engineer: names[Math.round(Math.random() * names.length)] || names[0],
                City: names[Math.round(Math.random() * city.length)] || city[0],
                Designation: designation[Math.round(Math.random() * designation.length)] || designation[0],
                Estimation: hours[Math.round(Math.random() * hours.length)] || hours[0],
                Rating: hours[Math.round(Math.random() * rating.length)] || rating[0],
                Status: status[Math.round(Math.random() * status.length)] || status[0]
            });
        }
        time = new Date().getTime();
        return result;
    };

    let dataSourceSettings = {
        dataSource: data(10000),
        expandAll: false,
        rows: [{ name: 'TaskID' }, { name: 'Status' }],
        columns: [{ name: 'Designation' }],
        values: [{ name: 'Estimation' }, { name: 'Rating' }]
    };

    function exportComplete(args) {
        pivotObj.hideWaitingPopup();
    }

    function btnClick() {
        pivotObj.excelExport();
    }

    return (
        <div>
            <div className="col-md-9"> <PivotViewComponent ref={(d) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
                allowExcelExport={true} enableVirtualization={true} exportComplete={exportComplete.bind(this)}>
                <Inject services={[ExcelExport]} /></PivotViewComponent>
            </div>
            <div className='col-lg-3 property-section'>
                <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
            </div>
        </div>);

};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, ExcelExport, Inject, ExportCompleteEventArgs } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';

function App() {
  let pivotObj: PivotViewComponent;
  let names: string[] = ['TOM', 'Hawk', 'Jon', 'Chandler', 'Monica', 'Rachel', 'Phoebe', 'Gunther',
    'Ross', 'Geller', 'Joey', 'Bing', 'Tribbiani', 'Janice', 'Bong', 'Perk', 'Green', 'Ken', 'Adams'];
  let city: string[] = ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Philadelphia', 'Phoenix', 'San Antonio', 'Austin',
    'San Francisco', 'Columbus', 'Washington', 'Portland', 'Oklahoma', 'Las Vegas', 'Virginia', 'St. Louis', 'Birmingham']
  let hours: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  let rating: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  let designation: string[] = ['Manager', 'Engineer 1', 'Engineer 2', 'Developer', 'Tester'];
  let status: string[] = ['Completed', 'Open', 'In Progress', 'Review', 'Testing'];
  let time: number = 0;
  let data: Function = (count: number) => {
    let result: Object[] = [];
    for (let i: number = 0; i < count; i++) {
      result.push({
        TaskID: i + 1,
        Engineer: names[Math.round(Math.random() * names.length)] || names[0],
        City: names[Math.round(Math.random() * city.length)] || city[0],
        Designation: designation[Math.round(Math.random() * designation.length)] || designation[0],
        Estimation: hours[Math.round(Math.random() * hours.length)] || hours[0],
        Rating: hours[Math.round(Math.random() * rating.length)] || rating[0],
        Status: status[Math.round(Math.random() * status.length)] || status[0]
      });
    }
    time = new Date().getTime();
    return result;
  };
  let dataSourceSettings: DataSourceSettingsModel = {
    dataSource: data(10000) as IDataSet[],
    expandAll: false,
    rows: [{ name: 'TaskID' }, { name: 'Status' }],
    columns: [{ name: 'Designation' }],
    values: [{ name: 'Estimation' }, { name: 'Rating' }]
  }

  function btnClick(): void {
    pivotObj.showWaitingPopup();
    setTimeout(() => {
      pivotObj.excelExport();
    });
  }

  function exportComplete(args: ExportCompleteEventArgs): void {
    pivotObj.hideWaitingPopup();
  }

  return (
    <div>
      <div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} dataSourceSettings={dataSourceSettings}
        allowExcelExport={true} enableVirtualization={true} exportComplete={exportComplete.bind(this)}>
        <Inject services={[ExcelExport]} /></PivotViewComponent>
      </div>
      <div className='col-lg-3 property-section'>
        <ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent>
      </div>
    </div>);
};

export default App;

Export only the current page

By default, the Pivot Table exports all data records, which can result in larger file sizes when a large data source is assigned to the Pivot Table. To improve performance, export only the data records currently visible in the viewport by setting the exportAllPages property to false.

This option is applicable only when the virtualization or paging feature is enabled.

import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, VirtualScroll, Inject } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: true,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        values: [{ name: 'Country' }, { name: 'Products' }],
        rows: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} exportAllPages='false' allowExcelExport={true} enableVirtualization={true} dataSourceSettings={dataSourceSettings}><Inject services={[VirtualScroll]}/></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        pivotObj.excelExport();
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, VirtualScroll, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import * as React from 'react';
import { pivotData } from './datasource';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: true,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    values: [{ name: 'Country' }, { name: 'Products' }],
    rows: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;
  
  return (<div><div className="col-md-9"> <PivotViewComponent  ref={ (d: PivotViewComponent) => pivotObj = d } id='PivotView' height={350} exportAllPages='false' allowExcelExport={true} enableVirtualization={true} dataSourceSettings={dataSourceSettings}><Inject services={[VirtualScroll]}/></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    pivotObj.excelExport();
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Events

ExcelQueryCellInfo

The excelQueryCellInfo event is triggered during the creation of each row and value cell while exporting data to Excel. This event offers options to change the content and style of individual cells in the exported Excel document, improving the flexibility and appearance of exported reports.

The event provides the following arguments:

  • value – Represents the value of the current cell in the exported Excel sheet.
  • column – Provides details about the column to which the current cell belongs.
  • data – Contains all data for the row that includes the current cell.
  • style – Defines the style settings (such as font, color, borders) applied to the current cell.
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let gridSettings = {
        columnWidth: 140,
        excelQueryCellInfo: excelQueryCellInfo.bind(this)
    };
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        drilledMembers: [{ name: 'Country', items: ['France'] }],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    function excelQueryCellInfo(args) {
        //triggers every time for header cell while rendering
    }
    return <div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} gridSettings={gridSettings} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>;
    function btnClick() {
        pivotObj.excelExport();
    }
};
export default App;
import { IDataSet, PivotViewComponent, ExcelQueryCellInfoEventArgs, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
import { pivotData } from './datasource';
import { GridSettings } from '@syncfusion/ej2-pivotview/src/pivotview/model/gridsettings';

function App() {
  let gridSettings: GridSettings = {
    columnWidth: 140,
    excelQueryCellInfo: excelQueryCellInfo.bind(this)
  } as GridSettings;

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    drilledMembers: [{ name: 'Country', items: ['France'] }],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;
  function excelQueryCellInfo(args: ExcelQueryCellInfoEventArgs): void {
    //triggers every time for header cell while rendering
  }

  return <div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} gridSettings={gridSettings} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>

  function btnClick(): void {
    pivotObj.excelExport();
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

ExcelHeaderQueryCellInfo

The excelHeaderQueryCellInfo event provides the ability to modify header cell appearance and content during Excel export, ensuring exported documents match specific formatting requirements or business standards. This event triggers while processing each header cell during the Excel export operation. The event contains the following parameters:

  • cell – Contains the current cell information and properties.
  • style – Contains the style properties that can be applied to the cell.
import { PivotViewComponent, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let gridSettings = {
        columnWidth: 140,
        excelHeaderQueryCellInfo: excelHeaderQueryCellInfo.bind(this)
    };
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: false,
        filters: [],
        drilledMembers: [{ name: 'Country', items: ['France'] }],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        rows: [{ name: 'Country' }, { name: 'Products' }],
        values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    function excelHeaderQueryCellInfo(args) {
        //triggers every time for header cell while rendering
    }
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} gridSettings={gridSettings} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
        <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function btnClick() {
        pivotObj.excelExport();
    }
};
export default App;
import { IDataSet, PivotViewComponent, ExcelHeaderQueryCellInfoEventArgs, ExcelExport, Inject } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import * as React from 'react';
import { pivotData } from './datasource';
import { GridSettings } from '@syncfusion/ej2-pivotview/src/pivotview/model/gridsettings';

function App() {
  let gridSettings: GridSettings = {
    columnWidth: 140,
    excelHeaderQueryCellInfo: excelHeaderQueryCellInfo.bind(this)
  } as GridSettings;

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: false,
    filters: [],
    drilledMembers: [{ name: 'Country', items: ['France'] }],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    rows: [{ name: 'Country' }, { name: 'Products' }],
    values: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;
  function excelHeaderQueryCellInfo(args: ExcelHeaderQueryCellInfoEventArgs): void {
    //triggers every time for header cell while rendering
  }

  return (<div><div className="col-md-9"> <PivotViewComponent ref={(d: PivotViewComponent) => pivotObj = d} id='PivotView' height={350} gridSettings={gridSettings} dataSourceSettings={dataSourceSettings} allowExcelExport={true}><Inject services={[ExcelExport]} /></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);

  function btnClick(): void {
    pivotObj.excelExport();
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

ExportComplete

The exportComplete event triggers after the Pivot Table data exports to an Excel or CSV document. This event enables acquiring blob stream data for further processing and customization by setting the isBlob parameter to true when calling the excelExport method. The event includes the following parameters:

  • type – Specifies the current export format such as PDF, Excel, or CSV.
  • promise – Contains the promise object that resolves with blob data for the exported file.
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { PivotViewComponent, VirtualScroll, Inject, ExcelExport } from '@syncfusion/ej2-react-pivotview';
import * as React from 'react';
import { pivotData } from './datasource';
function App() {
    let dataSourceSettings = {
        columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
        dataSource: pivotData,
        expandAll: true,
        filters: [],
        formatSettings: [{ name: 'Amount', format: 'C0' }],
        values: [{ name: 'Country' }, { name: 'Products' }],
        rows: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
    };
    let pivotObj;
    return (<div><div className="col-md-9"> <PivotViewComponent ref={d => pivotObj = d} id='PivotView' height={350} allowExcelExport={true} enableVirtualization={true} dataSourceSettings={dataSourceSettings} exportComplete={exportComplete.bind(this)}><Inject services={[VirtualScroll, ExcelExport]}/></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
    function exportComplete(args) {
        args.promise.then((e) => {
            console.log(e.blobData);
        });
    }
    function btnClick() {
        let excelExportProperties = {
            fileName: 'excelexport.xlsx'
        };
        pivotObj.excelExport(excelExportProperties, false, null, true);
    }
};
export default App;
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { IDataSet, PivotViewComponent, VirtualScroll, Inject, ExportCompleteEventArgs, ExcelExport } from '@syncfusion/ej2-react-pivotview';
import { DataSourceSettingsModel } from '@syncfusion/ej2-pivotview/src/model/datasourcesettings-model';
import { ExcelExportProperties } from '@syncfusion/ej2-grids';
import * as React from 'react';
import { pivotData } from './datasource';

function App() {

  let dataSourceSettings: DataSourceSettingsModel = {
    columns: [{ name: 'Year', caption: 'Production Year' }, { name: 'Quarter' }],
    dataSource: pivotData as IDataSet[],
    expandAll: true,
    filters: [],
    formatSettings: [{ name: 'Amount', format: 'C0' }],
    values: [{ name: 'Country' }, { name: 'Products' }],
    rows: [{ name: 'Sold', caption: 'Units Sold' }, { name: 'Amount', caption: 'Sold Amount' }]
  }
  let pivotObj: PivotViewComponent;
  
    return (<div><div className="col-md-9"> <PivotViewComponent  ref={ (d: PivotViewComponent) => pivotObj = d } id='PivotView' height={350} allowExcelExport={true} enableVirtualization={true} dataSourceSettings={dataSourceSettings} exportComplete={exportComplete.bind(this)}><Inject services={[VirtualScroll, ExcelExport]}/></PivotViewComponent></div>
    <div className='col-lg-3 property-section'><ButtonComponent cssClass='e-primary' onClick={btnClick.bind(this)}>Export</ButtonComponent></div></div>);
  function exportComplete(args: ExportCompleteEventArgs): void {
    args.promise.then((e: { blobData: Blob }) => {
      console.log(e.blobData);
    });
  }

  function btnClick(): void {
    let excelExportProperties: ExcelExportProperties = {
      fileName: 'excelexport.xlsx'
    };
    pivotObj.excelExport(excelExportProperties, false, null, true);
  }
};

export default App;
export let pivotData = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];
export let pivotData: object[] = [
    { 'In_Stock': 34, 'Sold': 51, 'Amount': 383, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 4, 'Sold': 423, 'Amount': 3595.5, 'Country': 'France', 'Product_Categories': 'Accessories', 'Products': 'Cleaners', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 11, 'Sold': 19, 'Amount': 85.5, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 10, 'Sold': 64, 'Amount': 320, 'Country': 'France', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2018', 'Quarter': 'Q4' },
    { 'In_Stock': 2, 'Sold': 141, 'Amount': 1692, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 30, 'Sold': 332, 'Amount': 3735, 'Country': 'France', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 9, 'Sold': 353, 'Amount': 3000.5, 'Country': 'Germany', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 32, 'Sold': 269, 'Amount': 1345, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 73, 'Amount': 1387, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Tires and Tubes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 19, 'Sold': 279, 'Amount': 205363, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Road Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 41, 'Sold': 82, 'Amount': 922.5, 'Country': 'Germany', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 15, 'Sold': 188, 'Amount': 1457, 'Country': 'Germany', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Teleshopping', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 31, 'Sold': 78, 'Amount': 1677, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2015', 'Quarter': 'Q3' },
    { 'In_Stock': 46, 'Sold': 393, 'Amount': 6681, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'Sales Person', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 35, 'Sold': 61, 'Amount': 991.25, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 34, 'Sold': 271, 'Amount': 4336, 'Country': 'United Kingdom', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 48, 'Sold': 361, 'Amount': 10469, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Shorts', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q1' },
    { 'In_Stock': 20, 'Sold': 464, 'Amount': 13108, 'Country': 'United Kingdom', 'Product_Categories': 'Clothing', 'Products': 'Jerseys', 'Order_Source': 'Teleshopping', 'Year': 'FY 2017', 'Quarter': 'Q1' },
    { 'In_Stock': 45, 'Sold': 257, 'Amount': 28784, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Vests', 'Order_Source': 'Sales Person', 'Year': 'FY 2015', 'Quarter': 'Q4' },
    { 'In_Stock': 5, 'Sold': 333, 'Amount': 2081.25, 'Country': 'United States', 'Product_Categories': 'Clothing', 'Products': 'Gloves', 'Order_Source': 'Teleshopping', 'Year': 'FY 2016', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 252, 'Amount': 401940, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Helmets', 'Order_Source': 'App Store', 'Year': 'FY 2018', 'Quarter': 'Q1' },
    { 'In_Stock': 38, 'Sold': 287, 'Amount': 457765, 'Country': 'United Kingdom', 'Product_Categories': 'Accessories', 'Products': 'Fenders', 'Order_Source': 'App Store', 'Year': 'FY 2016', 'Quarter': 'Q3' },
    { 'In_Stock': 29, 'Sold': 92, 'Amount': 146786, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Touring Bikes', 'Order_Source': 'Retail Outlets', 'Year': 'FY 2018', 'Quarter': 'Q3' },
    { 'In_Stock': 14, 'Sold': 535, 'Amount': 10165, 'Country': 'United States', 'Product_Categories': 'Bikes', 'Products': 'Mountain Bikes', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
    { 'In_Stock': 47, 'Sold': 405, 'Amount': 3037.5, 'Country': 'United States', 'Product_Categories': 'Accessories', 'Products': 'Bottles and Cages', 'Order_Source': 'App Store', 'Year': 'FY 2017', 'Quarter': 'Q4' },
];

Limitation when exporting millions of records to Excel format

Understanding this limitation helps you choose the appropriate export format based on your data size requirements and ensures optimal performance for large datasets. By default, Microsoft Excel supports only 1,048,576 records in an Excel sheet. Therefore, it is not possible to export millions of records to Excel format. You can refer to the documentation link for more details on Microsoft Excel specifications and limits. For large datasets, it is recommended to export the data in CSV (Comma-Separated Values) or other formats that can handle large datasets more efficiently than Excel.

See Also