Solved

export html to excel using javascript

Posted on 2002-05-28
7
8,767 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
ID: 7038652
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
ID: 7043782
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
ID: 7047088
The data is a report containing all kind of figures percentages etc. is build with <TABLE>,<TR>'s and <TD>'s

0
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 
LVL 2

Expert Comment

by:chops123
ID: 7048343
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
ID: 8263215
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
ID: 8356814
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
ID: 8404935
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article shows how to create and access 2-dimensional arrays in JavaScript.  It includes a tutorial in case you are just trying to "get your head wrapped around" the concept and we'll also look at some useful tips for more advanced programmers. …
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…
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…

770 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