SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jul 2007
    Posts
    229
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    passing bold text character from qtp to excel

    hi;

    I am having a scenario where I am passing the value of "status" as "Pass" and "fail" from Run Time of QTP to the Exce;l-Sheet.

    I would like to have the text appear as Bold Green colour for "status" --"Pass" and Bold Red Colour for "status"--fail.in excel sheet during the run time of qtp.

    Please dvise
    Sunil.

  2. #2
    Senior Member
    Join Date
    May 2008
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing bold text character from qtp to excel

    Hai friend,

    Just paste the below code in expert view run the test and select the color what you need.

    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = True
    objExcel.Workbooks.Add
    For i = 1 to 56
    objExcel.Cells(i, 1).Value = i
    objExcel.Cells(i, 1).Interior.ColorIndex = i
    Next


    Red color
    objExcel.Cells(1, 1).Font.ColorIndex = 3

    Green color
    objExcel.Cells(1, 1).Font.ColorIndex = 4

    Thanks
    The issue what you have listed does not exist, works fine in my machine- stupid comment from the developer

  3. #3
    Senior Member
    Join Date
    May 2008
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing bold text character from qtp to excel

    [ QUOTE ]
    Hai friend,

    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = True
    objExcel.Workbooks.Add
    For i = 1 to 56
    objExcel.Cells(i, 1).Value = i
    objExcel.Cells(i, 1).Interior.ColorIndex = i
    Next

    Thanks

    [/ QUOTE ]

    Mony,

    Just copy and paste the above code in expert view and then run and let me know.

    Thanks
    The issue what you have listed does not exist, works fine in my machine- stupid comment from the developer

  4. #4
    Senior Member
    Join Date
    Jul 2007
    Posts
    229
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing bold text character from qtp to excel

    hi;

    i am passing the value in "datatable",and then exporting the datatable to excel sheet.

    so i hve to pass these values in datatable instead of directly to excel sheet.

  5. #5
    Senior Member
    Join Date
    May 2008
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: passing bold text character from qtp to excel

    Hai mony,

    I have given an example how to apply color to excel cell please apply your logic it will work fine.

    Thanks
    The issue what you have listed does not exist, works fine in my machine- stupid comment from the developer

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:42 AM.

Copyright BetaSoft Inc.