Solved

export html to excel using javascript

Posted on 2002-05-28
7
8,742 Views
Last Modified: 2007-12-19
How can i export a html-output directly to excel?
0
Comment
Question by:hessmac
7 Comments
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
Comment Utility
You have to do that using the contenttype, unfortunately you cannot set that from the html's point of view. Can you use a serverside language like asp?

if so, it is rather easy. just add the following code before you write anything else out:
response.contenttype="application/vnd.ms-excel"

CJ
0
 
LVL 2

Expert Comment

by:chops123
Comment Utility
IE 6 has an option under the right-click menu saying
Export to Microsoft Excel.

Maybe you can try that out.

Programatically one would export to Excel only if the data in the HTML file is in a spread-sheet format.But the same also contains HTML tags.

What is the nature of the data you need to export ?

KC
0
 

Author Comment

by:hessmac
Comment Utility
The data is a report containing all kind of figures percentages etc. is build with <TABLE>,<TR>'s and <TD>'s

0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Expert Comment

by:chops123
Comment Utility
Your data will not be in a spreadsheet format when simply exporting directly..

Have you tried the IE 6 feature of exporting to excel.

If that doesnt work,you may have to parse your HTML file,select each value required from <TD>'s and enter them in specific cells in the Excel sheet

Rgds
KC
0
 
LVL 12

Expert Comment

by:ahosang
Comment Utility
This question has been abandoned. I will make a recommendation to the moderators on its resolution in a week or so. I appreciate any comments that would help me to make a recommendation.
 
In the absence of responses, I may recommend DELETE unless it is clear to me that it has value as a PAQ. Silence = you don't care
 
ahosang
0
 
LVL 12

Expert Comment

by:ahosang
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

split - CJ_S/chops123
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
ahosang
EE Cleanup Volunteer
0
 

Expert Comment

by:Chmod
Comment Utility
As recommended

Points for chops123 at http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20597735.html

Chmod
Community Support Moderator @Experts Exchange
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now