Mercurial > repos > jay > gaiac_precision
view gaiac_sensor_performance_evaluation/test-data/testout.html @ 3:1f9e67edde6a draft default tip
planemo upload for repository https://github.com/jaidevjoshi83/gaiac commit e9587f93346c7b55e1be00bad5844bf2db3ed03d-dirty
author | jay |
---|---|
date | Thu, 10 Jul 2025 19:42:02 +0000 |
parents | 287d6cc86582 |
children |
line wrap: on
line source
<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script> </head> <div id="docx"> <h3> Summary Table </h3> <div class="WordSection1"> <table table class="table table-striped"> <thead> <tr> <th>Intercept</th> <th>Slope</th> <th>r</th> <th>R Square</th> <th>RMSE</th> <th>NRMSE</th> <th>Bias</th> </tr> <thead> <tr> <td>-0.0±0.0</td> <td>1.0±0.0</td> <td>1.0</td> <td>1.0</td> <td>0.0</td> <td>0.0</td> <td>0.0</td> <tr> <tr> <td>-10.39±5.32</td> <td>1.89±0.18</td> <td>0.64</td> <td>0.41</td> <td>275.84</td> <td>606.85</td> <td>55.21</td> <tr> </table> </div> </div> <button id="export">Export</button> Click to open table in Microsoft Word <script type="text/javascript"> /* HTML to Microsoft Word Export Demo * This code demonstrates how to export an html element to Microsoft Word * with CSS styles to set page orientation and paper size. * Tested with Word 2010, 2013 and FireFox, Chrome, Opera, IE10-11 * Fails in legacy browsers (IE<10) that lack window.Blob object */ window.export.onclick = function() { if (!window.Blob) { alert('Your legacy browser does not support this action.'); return; } var html, link, blob, url, css; // EU A4 use: size: 841.95pt 595.35pt; // US Letter use: size:11.0in 8.5in; css = ( '<style>' + '@page WordSection1{size: 841.95pt 595.35pt;mso-page-orientation: landscape;}' + 'div.WordSection1 {page: WordSection1;}' + 'table{border-collapse:collapse;}td{border:1px gray solid;width:5em;padding:2px;}'+ '</style>' ); html = window.docx.innerHTML; blob = new Blob(['', css + html], { type: 'application/msword' }); url = URL.createObjectURL(blob); link = document.createElement('A'); link.href = url; // Set default file name. // Word will append file extension - do not add an extension here. link.download = 'Document'; document.body.appendChild(link); if (navigator.msSaveOrOpenBlob ) navigator.msSaveOrOpenBlob( blob, 'Document.doc'); // IE10-11 else link.click(); // other browsers document.body.removeChild(link); }; </script> <style type="text/css"> table { border-collapse: collapse; } td { border: 1px gray solid; padding: 4px; width: 5em; } </style>