google visualization table. Insert an image in a cell (from GDocs) - google-docs

I'm trying to insert a Google Spreadsheet in an html document and show it as a table.
So, my source is a Google Docs document and I call it with a query
(var query = new google.visualization.Query).
My table is a list of countries with some data about them. Html visualization until this point is OK.
But I want to add a column with an image (a flag). I don't know if it's possible to do this and, if possible, how to do it.
I've tried to put the link in the cell of the Google Spreadsheet, copy-paste an image, and an img src="...", but no luck. The only thing I have is the code written inside the cell both in the GDocs and the html visualization.
I've defined as an option
(var options = {allowHtml: true};
Any suggestion?
Thank you in advance!

This is possible, I'm not sure why your options didn't work.
This is an export to csv from my spreadsheet:
someContent,someImage
catz,<img src='http://1.bp.blogspot.com/-TzV-DfLU7jc/TagrymLT1HI/AAAAAAAABro/q4Jf1xNjxpk/s1600/ghoul.jpg' />
And the relevant javascript code after a call to the spreadsheet:
var data = response.getDataTable();
visualization = new google.visualization.Table(document.getElementById('visualization'));
visualization.draw(data, {allowHtml: true});
As you noted, allowHtml: true is required.

Related

How to Get web data based on link in excel cell?

I'd like to create an Excel sheet, where in one column there is a link to a website
like this:
Link in column A where there is a MAC add in that url that changes from line to line rest of link is geraric. and it takes the info in the 2 lines marked with arrows and put into another cell.
This should be possible for multiple links in different rows from websites with the same structure.
How can I make the web query to be based on the link in the adjacent cell?
You can use Power Query to read the contents of a cell.
Then in Power Query, you can return the web contents of the URL like this:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Get Web Contents" = Xml.Tables(Web.Contents(Table.FirstValue(Source))),
in
#"Get Web Contents"
You will need to be mindful of the data your query returns, i.e. is it a single value, table, or otherwise?
Here is documentation on how to to load the results from Power Query back to your excel worksheet: https://support.microsoft.com/en-us/office/create-load-or-edit-a-query-in-excel-power-query-ca69e0f0-3db1-4493-900c-6279bef08df4
I sort of found out. just made a simple WEBSERVICE(A2) to the URL and it returns a string with all the data, now i just need to extract only the data i need.

How to search a website using a range of cells in excel to extract specific data

I'm trying to search the website "capfriendly.com/players/" using a column of cells and import the "Cap Hit" value back into excel in the adjacent column for each.
I'm a complete beginner when it comes to programming, so I've mostly been trying to learn from previous questions such as this one: excel macro to search a website and extract results
I'm still pretty perplexed, especially with how to extract just the specific value I'm looking for. Any guidance would be greatly appreciated.
I don't know which version of Excel you work with.
Anyway you can try this :
Create a new sheet.
Go to Data in the ribbon to get external data and choose "From web".
Input the url of your page ie https://www.capfriendly.com/browse
After a moment you should retrieve "Results" data that you can load with or without structure modifications. You now have a data table in your new sheet.
You can now access it with Vlookup or similar function, with VBA code or with formulas, to put specific data on specific cells of specific sheets like you need to.
Hope it helps.

Excel 365 Get Data from web-based Json API issue

I am trying to Get & Transform data from a web API.
When I go to the URL through a browser I can view the data.
I copy the URL. Open Excel 365, click get data ...from web and paste the URL.
It looks like Excel is recognizing that it is a Json, because power query has Json.Document.....
However, it is not letting me view the actual data, each line only has "Record"
When I try Close & Load it loads [Record] into the rows in column A.
Any ideas on what is going on?
Kind Regards,
Dom
That's typically how data gets loaded in Power Query. Record's or Lists can be expanded to get the data inside them.
There are 2 things that you will want to based on what you want.
Click on any one record to see the data in just that one Record
Click on the Expand button on the column header to see data of all the Records in their respective rows. Please check out this answer
If you're not able to figure it out, please post an image.

show a missing value from one column compared to another

I'm moving a tracker from google sheets to Excel however the formula in excel does not work.
When i download the new data I want to know if any new vins have been added. In google sheets it would look at the MASTER then look at the Download and if there was any new vins it would show them in the New VINs. Please see the google sheets formula:
=IFERROR(QUERY('download'!$A$2:$Y, "Select W where not lower(Q) contains 'core' and (B=30 or B=35) and not W matches '"&JOIN("|", ' MASTER'!$E2:$E)&"'"))
Basically I need the excel version of this formula
Google spreadsheet's QUERY formula is actually based on Google Visualization API Query Language which you can only find in Google spreadsheet.
Unfortunately, there's nothing similar in excel. In addition, There is no inbuilt regex/ formulaic version of regex in excel.
Further Reading
SQL query in excel

How to extract data from online react-table to csv

I would like to have some way of obtaining the data from NHL.com's stats page which I believe is a react table and has no tag. An example would be the following:
http://www.nhl.com/stats/team?aggregate=1&reportType=game&dateFrom=2017-10-22&dateTo=2017-12-07&gameType=2&filter=gamesPlayed,gte,1&sort=points,wins
I have tried making an Excel query, but the table doesn't show up in Excel's web browser. I tried just manually copy-pasting from the webpage to Excel/Sheets, but all the data is pasted in the first column.
Any way of getting this information to a csv would be appreciated, especially some sort of automated way given a set of filters to pass into the URL.

Resources