Forum Discussion
Marcelo675
May 27, 2023Copper Contributor
Need to insert url on PNG files inside the spreadsheet
Hello, as you can see above, the spreadsheet already has a column with PNG files inside it. I need to put a url on these files so they can be used in the cloud.
How can I do this?
Remembering that I don't have these files external to this worksheet. They are already inside it as shown above in the photo.
Thanks for any help.
5 Replies
Sort By
- jimmaphyBrass Contributor
The question isn't clear to me. Are you looking for a one-by-one solution or are you looking for a macro to do them for you? In case of a one-by-one solution: right-click on the item -> link -> add hyperlink (at the bottom). Or if you don't mind shortcuts: select the item and hit ctrl + k.
VBA
In case you're looking for a solution through VBA, you could design a form like the one above. The code for the example form could be:
Private Sub CancelButton_Click() Unload Me End Sub Private Sub ConfirmButton_Click() ' Get the row select SelectedRange = Selection.Address ' Go over all rows For Each Cell In Range(SelectedRange) Hyperlink = UrlField.Value ' Check if the checkbox was checked to append the filename If AppendBox.Value = True Then ' Add the current cell value to the hyerlink Hyperlink = Hyperlink + Cell.Value End If ' Set the HyperLink ActiveSheet.Hyperlinks.Add Range(Cell.Address), Address:=Hyperlink Next Cell End Sub
Hopefully, this answers your question.
- Marcelo675Copper ContributorThanks jimmaphy.
Unfortunately it didn't solve my problem. In the first case, insert the hyperlink, as I said I don't have these PNG files outside the excel sheet. So I have no way to point to any file outside of excel.
In the second case, that of VBA code, it does not appear in the options for macros to be executed. I followed a tutorial on how to insert your code into a macro and it didn't work. I'm completely new to this.
I'll try to explain better what I need.
These PNG files inside the spreadsheet need to become hyperlinked files as they will be used in a PowerApps application, they will be the images of the products in the gallery.
I have already imported the spreadsheet as a table into PowerApps, but as the PNG files do not have a hyperlink, these files are not recognized as an image within PowerApps.
Did I explain it better now?
Thanks for your help.- peiyezhuBronze Contributorhttps://answers.microsoft.com/en-us/msoffice/forum/all/how-do-i-use-the-image-function-with-local-images/e539c52e-fe3c-40d0-b0da-fcbcc16802b2
or implement your own host and publish it with NAT service