Your first approach is correct, you should be calling the download function and passing in the xlsx
string
this.tabulator.download('xlsx', 'data.xlsx');
The issue is that Tabulator is expecting to find the XLSX object on the window
object (or global
object if this is a node project) as that is where the library is put when pulled in from the CDN.
So in you case your import should be:
import XLSX from 'xlsx/dist/xlsx.full.min.js';
window.XLSX = XLSX;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…