I'm using a template in my website, so when I export from PHP to CSV using Javascript :
window.location ="index.php/exporter_resultats";
I get a CSV file full of html of the whole page, not just the data I need.
Is there a way I can export the content of a specific div of the page, without the header and footer and the rest?