Hyperlink as display text

I have created variable
hyperlink = “=HYPERLINK(”“” + images + “”“,”“http://myurl/Automation/images_” + Now.ToString(“yyyy-MM-dd HH:mm:ss”) + “”“)” and wanted to pass hyperlink as display text as ERROR in one of the column in datatable using below expression
“=HYPERLINK(”“” + hyperlink + “”“, ““ERROR””)”

And its displaying in excel as below
=HYPERLINK(“(”“,“http://myurl/Automation/images_2023-04-27 17:25:21”)”, “ERROR”)"
but its not displaying as ERROR and not clickable

Can you please help

HI,

Is this regarding Excel function? Can you share your expected result?
In general, hyperlink function should be used as the following.

=HYPERLINK("URL","DISPLAYNAME")

So, it might be as the following.

hyperlink = "=HYPERLINK(""http://myurl/Automation/images_" + System.Net.WebUtility.UrlEncode(Now.ToString("yyyy-MM-dd HH:mm:s"))+""",""DISPLAYNAME"")"

Regards,

@r0818

This is how you can pass in expression

"=HYPERLINK(""http://myurl/Automation/images_" + Now.ToString("yyyy-MM-dd HH:mm:ss") + """,""ERROR"")"

In hypeink formula first is the url and second is the name you want to display

Cheers

thank you all,

Requirement is that screenshots saving in network folder
“\myNetwork-QA-WEB\Automation\screenshot.png” and this should be accessed outside of network using http link like this
http://myURL/Automation/images” .
I was able to pass like this before
“=HYPERLINK(”“” + images + “”“,”“http://myURL/Automation/images_” + Now.ToString(“yyyy-MM-dd HH:mm:ss”) + “”“)”
its working fine.

But now that http link to displayed as “ERROR” text in status column as screenshots only captured for failed steps.So, need to append that http URL which should be accessed that base networkfolder screenshot .png with display text as “ERROR”

Can anyone please how to achieve this

networkfolder path saved in variable called images

@r0818

I guess images variable has the link you need…please try this

"=HYPERLINK(""" + images + """,""ERROR"")"

Cheers

Hi @r0818

Can you try this-

=HYPERLINK(" & Chr(34) & hyperlink & Chr(34) & ", " & Chr(34) & “ERROR” & Chr(34) & ")

Thanks!!

I was using expression like below…
“=HYPERLINK(”“” + images + “”“,”“http://ftpdocs.laborfinders.jobs/Automation/images_” + Now.ToString(“yyyy-MM-dd HH:mm:ss”) + “”“)”

images is a variable where screenshots saving in networkfolder.
Its showing as http link clickable in screesnshots URL column…please check below…

Now as per requirement, that clickable hyperlink should display as ERROR display text
I tried all above suggestions… but its not working.
Can someone please help

@r0818

Let me break it down

"=HYPERLINK(""Link whatever you get for the screenshot"",""ERROR"")"

This is how it should be…whatever is the link that you think is correct for screenshto if its variable or text please replace ‘Link whatever you get for the screenshot’ this part with appropriate variable or link text

cheers

I need to first concatenate this network folder path to this http url,
network folder path = “\myNetwork-QA-WEB\Automation\screenshot.png”

Http url: ""http://myurl.com/Automation/

please help me how to concatenate and make it as http link … since it has backward slash in network folder path and forward slash in http url… I am not able to concatenate nate with http url
Can you please help

@r0818

Please try this

"=HYPERLINK(""http://myurl.com/Automation" + "\myNetwork-QA-WEB\Automation\screenshot.png".Replace("\","/") + """,""ERROR"")"

cheers

Thank you. its displaying as “ERROR” and clickable as well.
image

but when I click on it, its not able to access the screenshot like before , may be as we replace the backward slash with forward … its giving 404
image

@r0818

Please check or show how the url is looking may be a slash is missing or so

cheers

“=HYPERLINK(”“http://ftpdocs.url.jobs/Automation/” + “\myhq-QA-WEB\Automation\screenshot.png”.Replace(“",”/“) + “””,““ERROR””)"}

@r0818

Please remove one of these slashes…if you see in the formula I gave I removed the slash from the url after Automation

image

cheers

I removed one of the slash and its concatenating but not accessing screenshot from network folder path . its giving 404 file or folder not found.
http://ftpdocs.myurl.jobs/Automation/myHQ-QA-WEB/Automation/screenshot.png

@r0818

I cannot validate it from my end

but what you can do is…you can check the url you previously have which was working and check the difference between them and we can proceed accordingly

Also please check if there are extra spaces in the url

As Per you previous screenshots I guess url you gave previously was present in images variable directly…

cheers

1 Like

Can you please append now.tostring (yy.mm.hh.ss) for screenshot file.png… ? may be its going to capture and save
Can you pls modify this expression including datetimestamp please
“=HYPERLINK(”“http://myurl.com/Automation” + “\myNetwork-QA-WEB\Automation\screenshot.png”.Replace(“",”/“) + “””,““ERROR””)"

@r0818

I dont know where you need…trying it…move the location as you need

"=HYPERLINK(""http://myurl.com/Automation" + "\myNetwork-QA-WEB\Automation\screenshot".Replace("\","/") + Now.ToString("yyyy-MM-dd HH:mm:ss") +".png" + """,""ERROR"")"

if a underscore is needed any where then add it

cheers

images = \myNetwork-QA-WEB\Automation\screenshot.png

Can you please help me with expression for images to be displayed as http url? as string not use =HYPERLINK(…)

http://ftpdocs.myurl.jobs/Automation/images_" + Now.ToString(“yyyy-MM-dd HH:mm:ss”)

Then I am going to use that http string into =HYPERLINK(“url”, ““ERROR””)