Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text in Excel
#1
Solved: 10 Years, 8 Months, 2 Weeks ago
How can i code so that write color text in Excel file by Vbscripts in QTP??
Example as i want to write Pass is green and Fail is Red?Thanks all very much!!
Reply
#2
Solved: 10 Years, 8 Months, 2 Weeks ago
Code:
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.Workbooks.Open "Excel Location"

Set objSheet = xlApp.ActiveWorkbook.Worksheets(1)  ' Take Active WorkBook
objSheet.Cells(1,1).Interior.Color = vbRed
objSheet.Cells(2,1).Interior.Color = vbGreen
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Read text from text file and save it into a variable in qtp arpan 3 12,057 06-19-2013, 08:34 PM
Last Post: arpan
  Need to compare two text files - ignoring some text nelly27281 2 4,366 09-09-2012, 12:09 PM
Last Post: freeboynil
Shy Help about write color text by QTP in Excel mantis 1 5,155 12-29-2011, 10:46 AM
Last Post: sshukla12
  Finding specific text in a text string janriis 3 5,174 10-08-2010, 04:00 PM
Last Post: KavitaPriyaCR
  Copy content from a text file & paste it in text area in a web page qtpnewbie1 2 6,462 12-05-2008, 08:39 PM
Last Post: qtpnewbie1

Forum Jump:


Users browsing this thread: 1 Guest(s)