clarketm / TableExport

The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
https://tableexport.travismclarke.com/
Apache License 2.0
888 stars 289 forks source link

i want to increase width of particular columns when i am exporting html table to xlsx format using tableexport.js. #199

Open shubhamm829 opened 4 years ago

shubhamm829 commented 4 years ago

My code is:

var ExportButtons = document.getElementById('dynamic-table'); var instance = new TableExport(ExportButtons, { formats: ['xlsx'], position: "top", header:true, filename: 'Supplier_<?php echo date('d-M-Y-his');?>', ignoreCols: 7, trimWhitespace: true, exportButtons: false, htmlContent: true, sheetname: 'Supplier List'

}); var exportData = instance.getExportData()['dynamic-table']['xlsx'];

var xlsxData = exportData.xlsx;

var XLSbutton = document.getElementById('btn_excl'); XLSbutton.addEventListener('click', function (e) { instance.export2file(exportData.data, exportData.mimeType, exportData.filename, exportData.fileExtension, exportData.merges, exportData.RTL, exportData.sheetname); });