react-data-export icon indicating copy to clipboard operation
react-data-export copied to clipboard

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

Open reyansh25 opened this issue 4 years ago • 4 comments

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",

reyansh25 avatar Jan 19 '21 06:01 reyansh25

+1

rodrilima avatar Feb 01 '21 02:02 rodrilima

+1

IhorKurylov avatar Feb 12 '21 08:02 IhorKurylov

+1

bryantamayo1 avatar Oct 04 '21 11:10 bryantamayo1

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

mishapotap avatar Jan 31 '23 10:01 mishapotap