Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel formula to change page # when data entered in other page | Excel Discussion (Misc queries) | |||
How do I copy a graph of a data page to a new data page. | Charts and Charting in Excel | |||
excel fit to 1 page shows 1 page but not all data is on that page | Excel Programming | |||
Excel Data to Web Page | Excel Programming | |||
Printing second page if data overruns, otherwise print first page | Excel Programming |