I am trying to trigger code to run on the click of an image within Excel using Office JS.
So far I am giving the image a name in the Name Manager and then I'm using the onWorksheetCollectionSelectionChange() event handler to look for that name.
The name is found when I select any cell or range, but when I select the image itself, the onWorksheetCollectionSelectionChange() method is not called. It doesn't seem like an image can be included within a cell and share its properties, or can it?
Is there a way to achieve this without using VBA?
Thanks!
Could you try listening Excel.Shape.onActivated on the image and see if it works for you?
Related
So I'm trying build this custom column formula that will return the image from the specified column URL and then load it to Excel. But somehow it's not working.
Basically I want the query to work exactly like '=Image()' function in excel that retrieves images from the URL. Can anyone help me with this formula/query?
Here are the things that I have done so far
I have added a custom column formula
After Expanded Image It's showing a error
After loading the query It's showing this
Actual result that I want
To resolve your error, make sure ignore privacy is checked in your power query settings. There are 2 options (Global and Current Workbook) so change both to be sure. They should both be set to "Always ignore".
However, this still won't bring in binary image data from a url and I'm not sure there is a way to do so. If you already have the urls of the images, why don't you just paste those directly into Excel?
I am trying to get a full picture to upload onto a worksheet from its url. I have created a form where there is a file upload and I would like for it to show the image rather than a url. Is there a way to do this using office scripts?
Thank you!
This sample shows how to add an image to a workbook from a URL: Add images to a workbook.
Essentially, you need to use fetch to get the image information, convert it to a base64-encoded string, then use Worksheet.addImage to create an Excel shape storing the image.
Since you're using a form, you could create a Power Automate flow that runs the script whenever a new response is recorded. That might be out of scope from your original question, but it's something to consider as a next step.
I have set Path[image] column in the excel sheet as shown in the above image.
I wanted to convert this image path in the excel to an image and display it on the Media Image in Powerapps but the image did not appear.
Please do help me take a look at the problem I have encountered.
You can refer this community thread, it says
Notice that you have to have "[image]" inclued in your image column name to make PowerApps automantically show this column as a Picture control in the app.
Also check the prerequisites like cloud storage, image accessible path like explained here.
Is it possible to web-scrape image URLs using excel macros? To be clear, I want to scrape image-URLs and not the images.
If so, how?
I usually use the macros recorder to record functions that I don't remember, but the recorder doesn't pick up actions in my browser. So this suggests to me that it is not possible.
If not, what other tools have the function to data-scrape image urls?
Right now, to manually get image urls I have to go on the website, right-click on the image, and copy the image-url, and paste it into excel. There are over a 1000 images that I have to do this for. I have a long list of hyperlinks in excel.
Q: Is it possible to data-scrape image URLs using excel macros?
A: Yes.
Q: If so, how?
A: You learn VBA syntax first. Then learn about SHDocVw.InternetExplorer or MSXML2.XMLHTTP, both can help you to determine the rul of the desired image. Finally Download pictures from url and save in a folder named by a cell is an example to download image from url.
I'm looking to pull into the XML feed from Feedburner's API. This is just a matter of writing the URL and using the "From Web" data connection in Excel.
https://feedburner.google.com/api/awareness/1.0/GetItemData?uri=RSSFEEDNAME&dates=2011-08-01,2011-08-05
This works fine (and is pretty fast).
Now, I'd like to be able to update two cells in the "dates" sheet to have it pull that range of data. This is done using parameters in the URL:
https://feedburner.google.com/api/awareness/1.0/GetItemData?uri=RSSFEEDNAME[]
Using the Excel UI, I can then assign the [] to any cell. However, no matter what I try, this doesn't work. I initially thought there might be some issue with the date format so I've worked myself to the point where I am entering into the cell, the exact copy (&dates=2011-08-01,2011-08-05) as text.
Each time, the feed pulls up with just the current days data (which is the default behavior when no dates are specified). It isn't giving an error (which it will do for relatively small infractions, like not having two-digit months) which makes me think it just simply isn't replacing the [] with the specified text. I'm also using this same method for a WebTrends Web Service query and gettign similarly frustrating results. I've read every how-to on web queries, and I'm following them exactly.
I can't find any place to see what the final URL Excel is requesting, so it's a bit of a shot in the dark. Any thoughts on next steps would be greatly appreciated!
Best,
Nathan
The answer was no to use the Web Query "wizard" and just do it by hand.
Open Notepad (or some text editor)
In the editor type the following four lines:
WEB
1
http://example.com/index.html?something=[]&somethingelse=[]
[BLANK]
Save it as anything with an .iqy extension.
Open Excel, go to the Data ribbon, and click "Existing Connections"
Click "Browse for More..."
Find the IQY file you made and click "Open"
Excel will then ask you where you want to put the resulting data, followed by prompts for each placeholder you entered in the URL. Those prompts let you either type in a value, or select a cell to act as the data.
I would have thought that dates should have been a named parameter and that you should link that to whichever cell has the date value(s).
The cell should just have 2011-08-01,2011-08-05 as its value as long as you create the named parameter dates and link it to that cell