Hi Friends,
Today i am facing a problem.
i have a aspx page and this page have html table, which contain 5000 above rows .
i want download this html table as excel formate with the the help of javascript code but when i download then it will give error.
So plz give any suggession.
my javascript code is define below.
var a = document.createElement('a');
var data_type = 'data:application/vnd.ms-excel';
var table_div = document.getElementById('dataTable');
var table_html = table_div.outerHTML.replace(/ /g, '%20');
a.href = data_type + ', ' + table_html;
a.download = 'Sample.xls';
a.click();
e.preventDefault();
Hussam BarouqaPosted Jun 22, 2017, 9:45 AM
lt.Documents.DocumentFactory.loadFromUri(url, null)
.done(function (document) {
var jobData = new lt.Documents.DocumentConverterJobData();
jobData.documentFormat = lt.Documents.Writers.DocumentFormat.Xls;
jobData.rasterImageFormat = lt.Documents.RasterImageFormat. Unknown;
document.convert(jobData)
.done(function (result) {
var resultDocument = result.document != null ? result.document.url : result.archive.url;
window.open(resultDocument);
})
.fail(function (jqXHR, statusText, errorThrown) {
alert("Error converting document " + errorThrown);
});
})
.fail(function (jqXHR, statusText, errorThrown) {
alert("Error loading document " + errorThrown);
});
Hariharan KrishnamoorthiPosted Jun 19, 2017, 9:46 AM
Sundaram SubramanianPosted Jun 17, 2017, 11:58 PM
Manikandan MurugesanPosted Jun 17, 2017, 1:49 PM
Refer this link : http://www.windmill.co.uk/excel/excelweb.html
amit shuklaPosted Jun 17, 2017, 9:02 AM
Khaja MoizuddinPosted Jun 17, 2017, 5:25 AM