473,491 Members | 2,221 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Exporting HTML Table to MS Word?

A P
Is this possible? I am planning to export data from SQL that generates HTML
table. Instead of selecting the table and then copy then paste to word, I
need a script(JS or VB) that will automatically export or open the Query to
word.
Jul 19 '05 #1
6 5748
If you give the new page an extension of .doc, then Word should open the
client's desktop and display the page for them.

--
~Brad Kingsley
Microsoft MVP - ASP/.Net
Windows 2000 MCSE

http://www.orcsweb.com/
Powerful Web Hosting Solutions
#1 in Service and Support



"A P" <ap@textguru.ph> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Is this possible? I am planning to export data from SQL that generates
HTML
table. Instead of selecting the table and then copy then paste to word, I
need a script(JS or VB) that will automatically export or open the Query
to
word.

Jul 19 '05 #2
On Mon, 6 Sep 2004 10:00:50 +0800, "A P" <ap@textguru.ph> wrote:
Is this possible? I am planning to export data from SQL that generates HTML
table. Instead of selecting the table and then copy then paste to word, I
need a script(JS or VB) that will automatically export or open the Query to
word.


See:

http://support.microsoft.com/default...b;en-us;311461

Jeff
Jul 19 '05 #3
A P
its very complicated. Why is it like that? I notice on excel, you only need
to include this line?

Response.ContentType = "application/vnd.ms-excel"

Then you can convert html tables to excel.

"Jeff Cochran" <je*********@zina.com> wrote in message
news:41*****************@msnews.microsoft.com...
On Mon, 6 Sep 2004 10:00:50 +0800, "A P" <ap@textguru.ph> wrote:
Is this possible? I am planning to export data from SQL that generates HTMLtable. Instead of selecting the table and then copy then paste to word, Ineed a script(JS or VB) that will automatically export or open the Query toword.


See:

http://support.microsoft.com/default...b;en-us;311461

Jeff

Jul 19 '05 #4
Coz
Its complicated because that is a .net example - .net is complicated....
seems to be about all it is for me !

There is the equivalent for your "application/vnd.ms-excel" ...

application/msword

Try these:
http://ppewww.ph.gla.ac.uk/~flavell/...tent-type.html
http://www.utoronto.ca/ian/books/htm.../mimetype.html

both pretty useful.
"A P" <ap@textguru.ph> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
its very complicated. Why is it like that? I notice on excel, you only need to include this line?

Response.ContentType = "application/vnd.ms-excel"

Then you can convert html tables to excel.

"Jeff Cochran" <je*********@zina.com> wrote in message
news:41*****************@msnews.microsoft.com...
On Mon, 6 Sep 2004 10:00:50 +0800, "A P" <ap@textguru.ph> wrote:
Is this possible? I am planning to export data from SQL that generates HTMLtable. Instead of selecting the table and then copy then paste to word, Ineed a script(JS or VB) that will automatically export or open the
Query
toword.


See:

http://support.microsoft.com/default...b;en-us;311461

Jeff


Jul 19 '05 #5
A P
thanks!
"Coz" <co*@nospamcoz.com> wrote in message
news:#S**************@TK2MSFTNGP12.phx.gbl...
Its complicated because that is a .net example - .net is complicated....
seems to be about all it is for me !

There is the equivalent for your "application/vnd.ms-excel" ...

application/msword

Try these:
http://ppewww.ph.gla.ac.uk/~flavell/...tent-type.html
http://www.utoronto.ca/ian/books/htm.../mimetype.html

both pretty useful.
"A P" <ap@textguru.ph> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
its very complicated. Why is it like that? I notice on excel, you only

need
to include this line?

Response.ContentType = "application/vnd.ms-excel"

Then you can convert html tables to excel.

"Jeff Cochran" <je*********@zina.com> wrote in message
news:41*****************@msnews.microsoft.com...
On Mon, 6 Sep 2004 10:00:50 +0800, "A P" <ap@textguru.ph> wrote:

>Is this possible? I am planning to export data from SQL that
generates HTML
>table. Instead of selecting the table and then copy then paste to
word, I
>need a script(JS or VB) that will automatically export or open the

Query
to
>word.

See:

http://support.microsoft.com/default...b;en-us;311461

Jeff



Jul 19 '05 #6
A P
how about setting page margin on ms word? can I control that thru asp?
"A P" <ap@textguru.ph> wrote in message
news:#w**************@TK2MSFTNGP11.phx.gbl...
thanks!
"Coz" <co*@nospamcoz.com> wrote in message
news:#S**************@TK2MSFTNGP12.phx.gbl...
Its complicated because that is a .net example - .net is complicated....
seems to be about all it is for me !

There is the equivalent for your "application/vnd.ms-excel" ...

application/msword

Try these:
http://ppewww.ph.gla.ac.uk/~flavell/...tent-type.html
http://www.utoronto.ca/ian/books/htm.../mimetype.html

both pretty useful.
"A P" <ap@textguru.ph> wrote in message
news:Og**************@TK2MSFTNGP12.phx.gbl...
its very complicated. Why is it like that? I notice on excel, you only

need
to include this line?

Response.ContentType = "application/vnd.ms-excel"

Then you can convert html tables to excel.

"Jeff Cochran" <je*********@zina.com> wrote in message
news:41*****************@msnews.microsoft.com...
> On Mon, 6 Sep 2004 10:00:50 +0800, "A P" <ap@textguru.ph> wrote:
>
> >Is this possible? I am planning to export data from SQL that generates HTML
> >table. Instead of selecting the table and then copy then paste to word, I
> >need a script(JS or VB) that will automatically export or open the

Query
to
> >word.
>
> See:
>
> http://support.microsoft.com/default...b;en-us;311461
>
> Jeff



Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9210
by: sridevi | last post by:
Hello How to export data from ms-access database to excel worksheet using ASP. mainly i need to export data to multiple worksheets. it is very urgent to us. i have a sample code which works...
5
5515
by: Jayjay | last post by:
Is it possible to export a report to word and have it include the graphics that are in the report? I'd like to take some of our reports and export them to word so we can email those to the...
4
15784
by: Otis Hunter | last post by:
I have been given an Access Database which contains a table that has an OLE object field that contains a Word document. That table contains hundreds of records. I would like to find out how I can...
0
3314
by: Otis Hunter | last post by:
I have been fighting with this for days and your expert help is needed! Below is the code I am executing which results with "Object doesn't support this property or method". The error is occuring...
5
3033
by: mik18 | last post by:
I'm having trouble with exporting reports to Word in the rtf format and I'm hoping someone has a solution. The reports are losing their formats. Not all the formating is lost but some is and of...
3
3824
by: gowens | last post by:
I have an ASP.Net multi-part tabbed page. One of the tab pages contains several controls (including a DataList). The DataList contains, virtually-rendered, Database images and some text fields....
6
12546
by: Kevin Humphreys | last post by:
Hi There, I am trying to export a recordset to an excel file using the Content Type below in the header. Response.ContentType = "application/vnd.ms-excel" Which works fine however the...
2
2841
by: Mux | last post by:
I am facing the following problem while exporting data to Word. The current implementation is as described below: I have a JSP file which has a link that enables you to export the data to Word....
4
18402
by: Sonnich | last post by:
....is it the posssible to: format a field as "currency" or "number"? format a field as a formula? I create my sheet as a table Response.ContentType = "application/vnd.ms-excel"...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7190
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7360
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.