securedeveloper / react-data-export

Export dataset in react.
https://securedeveloper.github.io/react-data-export/
MIT License
179 stars 191 forks source link

TypeError: s.t.match is not a function when trying to use style for Column heading #149

Open reyansh25 opened 3 years ago

reyansh25 commented 3 years ago

My reason: Getting above error when trying to use style attribute for column headings

Steps to reproduce:

const excelDetailColumns = [
  {
    value: '#',
    widthPx: 160,
    style: {
      border: {
        top: { style: 'thin', color: { rgb: 'FF000000' } },
        bottom: { style: 'thin', color: { rgb: 'FF000000' } },
        left: { style: 'thin', color: { rgb: 'FF000000' } },
        right: { style: 'thin', color: { rgb: 'FF000000' } },
      },
    },
  },
  'Date',
  'Status',
];

Lib Version: "react-export-excel": "^0.5.3",

rodrilima commented 3 years ago

+1

IhorKurylov commented 3 years ago

+1

bryantamayo1 commented 2 years ago

+1

mishapotap commented 1 year ago

@reyansh25 Check your dependencies, you also need "xlsx" and "file-saver" packages to be installed. At least worked for me