Micro Focus QTP (UFT) Forums
Enable Hyperlink without opening the Excel - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Enable Hyperlink without opening the Excel (/Thread-Enable-Hyperlink-without-opening-the-Excel)

Pages: 1 2


Enable Hyperlink without opening the Excel - Sathiya - 05-25-2012

Hi Friends,
The common function we are using will do the following.
1. Execute the script
2. Take the screenshots (.PNG format)of the passed and failed test cases
3. Place the screenshots in the mentioned folder in the local PC
4. Update the screenshot path in the specified column in the excel from where the actual inputs are
i want to add [/font]hyper link to the screenshotpath in excel


RE: Enable Hyperlink without opening the Excel - supputuri - 05-25-2012

HI Sathiya,

Please create an excel object and then use the Hyperlinks method to create the hyper link.

snippet:
Code:
Set  objEx = CreateObject("Excel.Application")

HI Sathiya,

Please create an excel object and then use the Hyperlinks method to create the hyper link.

snippet:
Code:
Set objEx = CreateObject("Excel.Application")
'Example: ScreenShotName = screenshotFolderPath & screenshotName(UserDefined)  & ".png"
ScreenShotName = screenshotFolderPath & Environment.Value("ActionName") &SetDateFormat(now(), "mm-dd-yyyy HH-nn-ss")  & ".png" ' here we are giving the dynamic name for screenshot with time stamp.
Set objLink = objEx.ActiveWorkbook.ActiveSheet.HyperLinks.Add (objEx.Selection,screenshotName)

Let me know if you need any further info.


RE: Enable Hyperlink without opening the Excel - Sathiya - 05-28-2012

hi friend,
thanks for your reply....
but the above idea is not working... i am trying for the solution.


RE: Enable Hyperlink without opening the Excel - supputuri - 05-28-2012

hi Sathiya,
Is there any error message? Can you please share that so that I can have a quick thought the error...




RE: Enable Hyperlink without opening the Excel - Sathiya - 05-29-2012

Hi,
the script runs without any error. at the same time hyper link not enabled


RE: Enable Hyperlink without opening the Excel - supputuri - 05-29-2012

you mean, when you click on the hyperlink it's not bringing the error image?




RE: Enable Hyperlink without opening the Excel - Sathiya - 05-29-2012

after executing the script the screenshot path column value has the normal text values (hyperlink not enabled).



RE: Enable Hyperlink without opening the Excel - supputuri - 05-29-2012

OK. Can you validate that the cell format. I think the cell format is marked as other than General.


RE: Enable Hyperlink without opening the Excel - Sathiya - 05-30-2012

format is "General"


RE: Enable Hyperlink without opening the Excel - Sathiya - 05-31-2012

hi
after running the script the cell values has underline but hyperlink not get enabled...
any solutions?