Code to Save HTML table as xls file on click

  • Thread starter Thread starter Joe Black
  • Start date Start date
J

Joe Black

Hi,

I am trying to save a HTML table to an excel file. However I want this to
happen through code.

If I click a button I should have the table open in an excel instance.

TIA
 
Click a button where? In excel? Where is the HTML table?

Tim
 
Hi Tim,

I am trying to create a click button on the HTML page to perform this.
This is what I want it to do:

On click of the button, it should open another window with the HTML table in
excel file format for which I can then do File --> Save --> *.xls

TIA
 
Is this a HTML page on the internet(or intranet) ? If you have access
to server-side coding it's pretty easy: if not it's going to be pretty
difficult. Code in the browser has no access to the user's file
system and - unless they have dangerous security settings - no
ability to create an Excel file using automation (for example).

I'm not sure this is possible using purely client-side scripting...

Tim.
 
Hi Tim,

This is a site on the Intranet and its being developed using Lotus Domino
6.5 so access to server is available.

Hope this is useful.
 
Joe,

My only server-side experience is with ASP or Perl, so I can't really
comment on Domino.
However, the basic concepts are the same: get whatever code creates the
original HTML table to instead create it in Excel format and send it to the
browser. If you search Google for "ASP Excel" you will find many examples
of how to do this. One method is to set the "content-type" to excel and
then just write the content as an HTML table: Excel will interpret this as a
regular worksheet.

http://www.codeave.com/asp/code.asp?u_log=40

http://archive.baarns.com/DevOnly/Notes/TechEd/Intr9712.asp
http://archive.baarns.com/DevOnly/Notes/TechEd/Intr9713.asp

Tim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top