Google Sheets/CC Question

Sort:
jaredjm

I'm wondering if there's some way in Google Sheets to either/or:

1) Get the result of the game imported right into the sheet, from a game link. Like, can I give the sheets a link and have them look up the result of the game from the cc database, automatically?

2) Put the value of a Google sheet cell into a chess.com news post, with the edit html feature. Can I embed something so (the post) will look up the value in a sheet cell, and return it automatically? 

Thanks!

SJCVChess

2) Posts here are not dynamic. The value will not update. So, the answer to the second part is "NO."

1) It should be possible, but I don't know Google Sheets' mechanisms for importing data.

I'm assuming it has advanced far beyond my last experience, and would naturally assume pluggable modules are allowed, such that if you dev a pluggable module for the Google Sheets platform, along whatever development lines they give, you should be able to pull data from an API. But, as they say, assumptions are the mother of all mistakes.

Lastly, using spreadsheet software for data manipulation and presentation like this is really bad form.

Another way of looking at it (answering your own question): IF you could present dynamic information like this, then wouldn't you be able to do it on Chess.com without first having import things to a spreadsheet? If dynamic behavior is allowed, then it would be highly likely that calculations could be made dynamically, too, thus negating the need for a spreadsheet.

ImperfectAge

It's possible to some extent, depending on exactly what information you want.

You need the following two things:

1. Published Data API https://www.chess.com/news/view/published-data-api

2. ImportJSON (or some other way to bring the JSON data into gsheets):  https://github.com/bradjasper/ImportJSON

stephen_33

On the subject of pasting dynamic content into a news item on this site, I wouldn't be too hopeful. From experience I've found that anything more than basic HTML & styling content is usually stripped out by the site's post editor.

For example, any web content pasted seems to have all Javascript functionality removed. I think the site probably wants to protect itself from the installation of possible viruses?

ImperfectAge

Yes, you can't post dynamic content of any kind.  That would be too dangerous, as Stephen says

stephen_33

As an example, I spent a few frustrating hours one day trying to paste some text & make it 'blink' on & off. It involves relatively uncomplicated styling using CSS animation & worked beautifully in a test page in my browser but even that got removed when I pasted it.

Tricky_Dicky

You can use Excel macro to pull the data into a sheet and then cut and paste into Google doc

 

jaredjm
stephen_33 wrote:

As an example, I spent a few frustrating hours one day trying to paste some text & make it 'blink' on & off. It involves relatively uncomplicated styling using CSS animation & worked beautifully in a test page in my browser but even that got removed when I pasted it.

ok, thanks

SJCVChess

Okay, now I'm amused.

More suggestions anyone?

Something tells me that this thread can get much more entertaining.

jaredjm

I have actually found a way to get some game properties into a sheet with =importxml(link, Xpath stuff) but it doesn't automatically refresh

SJCVChess

It's not going to refresh unless there's a trigger to refresh. Does Google Sheets have a timer or automation function?

jaredjm

There are ways of doing it

stephen_33
jaredjm wrote:

There are ways of doing it

Have you seen it done on this site?

jaredjm

a Sheets refresh trigger? No

SJCVChess
stephen_33 wrote:
jaredjm wrote:

There are ways of doing it

Have you seen it done on this site?

 

I did a quick Google search for "Google Sheets recalculate cell," and the top result was a hit for how to automate doing this, February 7th, 2019 ...

https://www.solveyourtech.com/how-to-change-recalculation-settings-in-google-sheets/

That still doesn't deal with dynamically refreshing information on this site.

Which brings about an interesting observation or thought, given the public API: Anything that can leverage the public API might also be beneficial to allow dynamic information using it to be presented on this site.

How you would go about allowing or enabling that type of behavior, without violating other basic security is the big question mark, imo.