material-table icon indicating copy to clipboard operation
material-table copied to clipboard

How export only CSV

Open ninew089 opened this issue 6 years ago • 4 comments

I wan to export only CSV , I don't want export PDF .

ninew089 avatar Aug 16 '20 08:08 ninew089

I've just had a look, it appears that there isn't an option to toggle individual export formats - I think this option should be added. In the meantime, one option is to downgrade material-table to v1.62.0 (export to PDF was introduced in v1.63.0).

ollyrowe avatar Aug 16 '20 10:08 ollyrowe

@ollyrowe thank you so much .

ninew089 avatar Aug 16 '20 11:08 ninew089

You can do the following:

const options = {
  exportButton: {
    csv: true,
    pdf: false,
  },
};

<MaterialTable data={data} columns={columns} options={options} />;

zeckdude avatar Nov 23 '20 00:11 zeckdude

With

const options = {
  exportButton: {
    csv: true,
    pdf: true,
  },
};

csv download works but not pdf.

solelthermtechnik avatar Feb 23 '21 14:02 solelthermtechnik