Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"HTML Report"
#6
Solved: 10 Years, 9 Months ago
Vinod123, Question in context is not about getting result report in html, the question is display the content of the web table in html and generate.

Ravi.gajul has correctly replied, we have to use file system object to write the content in the html way. use proper formatting as well to display the content in aligned way.

Below is what I tried and working-

Code:
Set fso = CreateObject("Scripting.FileSystemObject")
    Set MyFile = fso.CreateTextFile("C:\Documents and Settings\" & Environment("UserName") & "\Desktop\testResult_"& myDate & "-" & myTempTime &".html", True)
    MyFile.WriteLine "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">"
    MyFile.WriteLine "<HTML>"
    MyFile.WriteLine "<HEAD>"
    MyFile.WriteLine "<TITLE> Sanity Tests run on Magnet Dev</TITLE>"
    MyFile.WriteLine "<META http-equiv=Content-Type content="&Chr(34)&"text/html; charset=windows-1252"&Chr(34)&">"
    MyFile.WriteLine "<STYLE type=text/css>TD {"
    MyFile.WriteLine "FONT-SIZE: 10pt; FONT-FAMILY: Verdana"
    MyFile.WriteLine"}"
    MyFile.WriteLine "</STYLE>"
    MyFile.WriteLine "<META content="&Chr(34)&"MSHTML 6.00.6000.17107"&Chr(34)&" name=GENERATOR></HEAD>"
    MyFile.WriteLine "<BODY>"
    MyFile.WriteLine "<TABLE borderColor=#336699 cellSpacing=2 cellPadding=2 bgColor=#ffffcc border=2><TBODY>"
    MyFile.WriteLine "<tr>"
    MyFile.WriteLine "<th bgColor=#ccffff> Action Performed</th>"
    MyFile.WriteLine"<th bgColor=#ccffff> Expected Result</th>"
    MyFile.WriteLine "<th bgColor=#ccffff> Actual Result</th>"
Reply


Messages In This Thread
"HTML Report" - by suresz449 - 01-06-2012, 10:14 AM
RE: "HTML Report" - by vIns - 01-06-2012, 10:46 AM
RE: "HTML Report" - by vinod123 - 01-06-2012, 02:06 PM
RE: "HTML Report" - by ravi.gajul - 01-07-2012, 10:24 AM
RE: "HTML Report" - by vinod123 - 06-18-2014, 04:57 PM
RE: "HTML Report" - by Tarik Sheth - 06-18-2014, 07:44 PM
RE: "HTML Report" - by Naresh - 04-10-2015, 01:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)