How to get report table HTML content?

Answered

Hi guys,
The exportTo (‘html’, options) function generates a table in html and saves it to a file for download. Is there any function that just returns that html content in the code (without necessarily forcing the download)? For example:

let htmlTable = generateTableHtml(options);

1 answer

WebDataRocks Team WebDataRocks November 4, 2019

Hello, Gleyton,
 
Thank you for your question.
 
You can return the desired HTML content using the following construction:

function htmlToValue() {
webdatarocks.exportTo("html", null, res => { console.log(res) });
}

 
Find out an example by following the link: https://codepen.io/webdatarocks/pen/JjjpOyb.
 
For now, it’s impossible to call the exportTo method without downloading the file. We recommend you checking on Flexmonster which is a premium pivot table component developed by the same team. The exportTo method without necessarily forcing the download is available in Flexmonster: https://www.flexmonster.com/api/exportto/.
 
Kind regards,
WebDataRocks Team

Please login or Register to Submit Answer