Coloring cell of runtime datatable - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Coloring cell of runtime datatable (/Thread-Coloring-cell-of-runtime-datatable) |
Coloring cell of runtime datatable - indranilgoswamimcb - 08-03-2012 I am updating the test case status in the runtime datatable as "Pass" or "fail".The entire test case excel sheet had been imported to the run time datatable. After the execution is over the runtime datatable would simply be exported and saved as the test execution excel sheet. My query is ,I need to color the particular cell of the "pass" as light green (background color) and the "fail" status as "red"(background color again). How do I do that inside the run time data table so that the same can be exported and saved as the test execution result sheet. RE: Coloring cell of runtime datatable - sshukla12 - 08-03-2012 Hi, First export the datatable to excel sheet and then using Excel object u can change the color of any cell. Let me know in case of any help required. Regards, Sankalp RE: Coloring cell of runtime datatable - indranilgoswamimcb - 08-03-2012 Hi, The project requirement is that while exporting to excel sheet the date and time should also be appended.Hence,it is very difficult to identify the excel sheet generated as it is unique everytime. Is there any way to color the cell in runtime datatable itself? Regards, Indranil. RE: Coloring cell of runtime datatable - SteveS - 08-03-2012 Hi Indranil, It is not possible within QTP itself although I do something very similar including appending date and time to the excel sheet. When you perform the export write the full path and filename to an environment variable and at the end of the test call a function similar to below to update the formatting passing the environment variable as the file: Code: Function FormatExcel(cFile) |