Can we integrate Datatable with excel export in a SharePoint SPFX webpart?
Can we integrate Datatable with excel export in a SharePoint SPFX webpart?

Hi,
I have been trying to integrate a datatable with excel export in SharePoint SPFx web part.
The output that I see is pretty weird.
The PDF, Export to CSV, print options are working but only excel is not working.
This discussion has been closed.
Answers
If pdf, csv and print are working Excel should also work. Post a test case please or the code you are using for pdf, csv and Excel.
It's probably missing files. If you look at this example here, ensure you have the necessary files listed on the Javascript and CSS tabs beneath the table.
Colin
I believe this is the issue with using jszip. I am working on SharePoint SPFX.
Actually I am unaware of how to install jszip in an SPFX webpart
npm install jszip
then in your webpart ts add the import:
import * as JSZip from 'jszip';
then before DataTable() call
window["JSZip"] = JSZip;
is not optimal but works.