Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
Excel download.
amit shukla
Jun 17 2017 4:48 AM
284
Reply
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();
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
What is the difference between Let and Var
Need Google Analytics Data in my web page.