Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel data to a web page


I need a VB Script or Java Script that allows one to take select dat
(i.e. Range("A1")) from a specific Excel worksheet and place it into
web page. Thank you

--
ffcya
-----------------------------------------------------------------------
ffcyan's Profile: http://www.excelforum.com/member.php...fo&userid=1450
View this thread: http://www.excelforum.com/showthread.php?threadid=26130

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel data to a web page

this code puts a section in an email using html. Perhaps you can adapt it:
http://www.mrexcel.com/board2/viewtopic.php?t=8251

It will only work with xl2000 or later.
--
Regards,
Tom Ogilvy

"ffcyan" wrote in message
...

I need a VB Script or Java Script that allows one to take select data
(i.e. Range("A1")) from a specific Excel worksheet and place it into a
web page. Thank you.


--
ffcyan
------------------------------------------------------------------------
ffcyan's Profile:

http://www.excelforum.com/member.php...o&userid=14505
View this thread: http://www.excelforum.com/showthread...hreadid=261302



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Excel data to a web page

Hi ffcyan, a mate wrote this code, it works for me...it puts all the
information in a table in a web page...


Const FileName = "C:\My Program\yourplace\All Web
Pages\sheetname.htm"

Dim xlRow As Long
Dim xlCol As Long


Public Sub BallSumsHTML()

Open FileName For Output As #1

Print #1, "<HTML"

' Code below commented out as it is only applicable if you are
using a stylesheet
' in the web site to control layout etc.,

Print #1, " <HEAD"
Print #1, " <titleBall Sums</title"

'Print #1, " <BASE TARGET='MainForm'"
'Print #1, " <META http-equiv='Content-Style-Type'
content='Text/css'"
'Print #1, " <LINK type='text/css' rel='stylesheet'
href='lottery.css'"

Print #1, " </HEAD"
Print #1, " <BODY"
Print #1, " <H1"
Print #1, " <CENTERBall Sums</CENTER"
Print #1, " </H1"
Print #1, " <P"
Print #1, "The table below shows you the ball sums."
Print #1, "<P align = center"
Print #1, " <table border='8'"
Print #1, " <tr"


' This next piece of code reads the xlsheet header information and
builds the
' HTML table header.

For xlCol = 1 To 3

Print #1, " <td align='center'bgcolor='; #fcfcfc; '" &
Sheets("sheet3").Cells(1, xlCol).Value & "</td"

Next

Print #1, " </tr"

' This next piece of code reads the xlsheet information and moves
the
' game data into the HTML table.

xlRow = 2

Do While Not Sheets("sheet3").Cells(xlRow, 1).Value = ""
Print #1, " <tr"

For xlCol = 1 To 3

If Val(Sheets("sheet3").Cells(xlRow, xlCol).Value) < 0 Then

Print #1, " <td align='center'bgcolor = '#cdcccc'" &
Sheets("sheet3").Cells(xlRow, xlCol).Value & "</td"

Else

Print #1, " <td align='center'" &
Sheets("sheet3").Cells(xlRow, xlCol).Value & "</td"

End If
Next

xlRow = xlRow + 1

Loop

Print #1, " </tr"
Print #1, " </TABLE"
Print #1, " <a href = 'menu.htm' go to menu</a"
Print #1, " </BODY"
Print #1, "</HTML"

Close #1

End Sub

hth..

seeya ste
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel formula to change page # when data entered in other page Solograndma Excel Discussion (Misc queries) 2 March 12th 07 01:35 PM
How do I copy a graph of a data page to a new data page. Jackrc Charts and Charting in Excel 1 May 9th 06 12:20 PM
excel fit to 1 page shows 1 page but not all data is on that page Jans Excel Programming 1 September 2nd 04 01:49 AM
Excel Data to Web Page Jon Turner Excel Programming 0 June 24th 04 04:27 PM
Printing second page if data overruns, otherwise print first page playdohstu Excel Programming 1 February 12th 04 02:08 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"