Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text in Excel
#1
Solved: 11 Years, 3 Months, 3 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: 11 Years, 3 Months, 3 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,957 06-19-2013, 08:34 PM
Last Post: arpan
  Need to compare two text files - ignoring some text nelly27281 2 4,577 09-09-2012, 12:09 PM
Last Post: freeboynil
Shy Help about write color text by QTP in Excel mantis 1 5,372 12-29-2011, 10:46 AM
Last Post: sshukla12
  Finding specific text in a text string janriis 3 5,504 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,804 12-05-2008, 08:39 PM
Last Post: qtpnewbie1

Forum Jump:


Users browsing this thread: 2 Guest(s)