Change this:
if ($(this).css('display') != 'none') tmpRow[tmpRow.length] = formatData($(this).html());
To this:
if ($(this).css('display') != 'none') tmpRow[tmpRow.length] = formatData($.trim($(this).html()));
No words wasted! Getting to the point about the work I do, the problems I deal with, and some links to posts about where I work.
Translate
Monday, July 9, 2012
jQuery - Convert HTML Table to Excel
One of my users needs to be able to save table data as an Excel file in the web app that I'm working on and the web app is just weeks from being released. Luckily it's easy to do this using the jQuery table2CSV plugin. It seems there are a few of these floating around the Internet. I got mine from the jQuery tableToCSV plugin site.
Works like a charm. The only thing I need to fix was:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thank you for commenting!