I don't have the full working solution, but I think it should able to guide you to code your own solution.
Take a screenshot in web browser
I should clarify that we cannot have any screenshot. But we can generate a picture of a component as a screenshot.
$(function() {
$("#btnSave").click(function() {
html2canvas($("#widget"), {
onrendered: function(canvas) {
theCanvas = canvas;
canvas.toBlob(function(blob) {
// If you okay with export as image, this is end
saveAs(blob, "Dashboard.png");
// otherwise, comment above line, and post it back to server
});
}
});
});
});
Full discussion can be found here: https://stackoverflow.com/a/24619118/1050927
Paste image into Excel file
After you post the blob (as file, example here), you can get that in server, and use Microsoft Office API or other API to create an Excel file and paste it into excel
Return Excel file to user
After you have done that, return the excel file back to user.