jtable export to Excel

jtable export to Excel

Hi all,

I'm quite new to jQuery and jTable, but I have programmed a jTable page for my intranet and it works really great.

Now it comes, that the request for an Excel-export arises and I searched the web how do manage it. I've found this little code fragment:

$("#btnExport").click(function(e) {
window.open('data:application/vnd.ms-excel,' + encodeURIComponent($('#dvData').html()));
e.preventDefault();
});​


I understand, that "#dvData" should be the Table, but it didn't work for me. I've tried "#jtable"..."undefined" is the result in Excel. If I use "#jtable-main-container" I have all the HTML in Excel, so the general dataflow seems to work.

Can anybody enlight me what how to achieve this Excel-Export?

THANKS in advance,
MiLe...!