Create xlsx from html by API



  • Hi, I need to convert to xls the table located on the page at the click of a button. How can I send the full html code of the table via a post request?



  • I found my issue. I used in template "data"

     "template":
     {  
    	"content": "<html><head><style>"
    					+cssContent								//your css text
    					+"</style></head><body>"
    					+document.getElementById('yourTableID').outerHTML
    					+"</body></html>", 
    	"shortid":"shortid", 			//from API info in jsreport studio
    	"options": 
    	{
    		"reports": 
    			{
    				"save": true
    			}
    	}
    			   
    } 
    

    for my html code, but for sending code of table I must using "content".
    Maybe it will be usable for someone.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.