JSFiddle - React, Tailwind, and code Playground

by Flexmonster Pivot Table

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivotContainer"></div>

JavaScript

var pivot = new Flexmonster({
  container: "pivotContainer",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.csv"
    }
  },
  beforetoolbarcreated: customizeToolbar
});

function customizeToolbar(toolbar) {
  var tabs = toolbar.getTabs();
  toolbar.getTabs = function() {
    tabs.unshift({
      title: "Export+",
      icon: tabs[3].icon,
      menu: [{
          title: "Excel XLSX",
          handler: xlsxHandler,
          icon: tabs[3].menu[3].icon
        },
        {
          title: "Excel XLSB",
          handler: xlsbHandler,
          icon: tabs[3].menu[3].icon
        }
      ]
    })
    return tabs;
  }
}

function xlsxHandler() {
  alert("Export to XLSX");
}

function xlsbHandler() {
  alert("Export to XLSB");
}