TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
amit shukla
NA
78
66.3k
Excel download.
Jun 17 2017 4:48 AM
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();
Reply
Answers (
6
)
What is the difference between Let and Var
How would you check if an element is visible on the page?