Comments (2)
@clarketm I think the main culprit with the script is the getExportData()
function. I change my code so it manually exports the data as you can see in the below code, but the call to getExportData()
takes forever to finish executing which causes the browser to slow down.
$(function (e) {
'use strict';
var tables = $('.exportable');
if (!tables.length) {
return;
}
$('<button class="btn btn-primary manual-export-to-xls" title="Export To Excel">Export To Excel</button>').insertBefore(tables);
$(document).on('click', '.manual-export-to-xls', function (el) {
var tbl = $(this).parent().parent().find('.export-table').first();
var table = new TableExport(tbl, {
formats: ['xls'],
exportButtons: false,
bootstrap: true,
trimWhitespace: true
});
var data = table.getExportData(); // This call takes forever to finish which kills the browser.
var exportData = data['export-buttons-table']['xls'];
table.export2file(exportData.data, exportData.mimeType, exportData.filename, exportData.fileExtension);
});
});
from tableexport.
Pull request #195 fixes this problem once and for all. I tested the outcome on one report I have, the time to export the data went down from 12 seconds to 1! Yes, 10-11 seconds less without browser issue while not impacting the page load.
from tableexport.
Related Issues (20)
- Unable to export the file on Internet explorer browser using Tableexport plugin
- xlsx doesn't support dd/mm/yyyy date format as source data HOT 1
- Error in Excel
- How to download the excel file without adding to DOM?
- why my data excel '#######' HOT 1
- don't show more export button HOT 1
- date on the csv export is at +1 HOT 1
- ignoreCSS in custom option is redefined.
- Problem with cyrillic
- Text "Module 1" is incorrectly rendered as "31/12/2000" in xlsx
- Support for Bold cells
- The property ‘sheetname’ is not working. HOT 1
- Issue with values like x.x.x on exporting as excel
- Can I export with image in table
- PhantomJS support
- PDF Export no support Arabic
- Pass data from JSON
- i want to increase width of particular columns when i am exporting html table to xlsx format using tableexport.js.
- TableExport in asp.net core
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tableexport.