Cride5 / visualcube

A php script for generating Rubik's Cube visualisations
http://cube.crider.co.uk/visualcube.php
GNU Lesser General Public License v3.0
141 stars 40 forks source link

Fix Google Sheets support #9

Closed ivandardi closed 6 years ago

ivandardi commented 6 years ago

Google Sheets allows one to add images directly from URLs. Combine that with VisualCube and you get an automatically illustrated algorithm spreadsheet.

This is how one of my formula works:

=IMAGE("http://cube.crider.co.uk/visualcube.php?fmt=svg&pzl=2&stage=cll&view=plan&case=" & C2)

When I put an alg at the end of the URL and visit it in my browser, it works great! However, when I put it in Google Sheets, nothing is displayed. It might be because the URL doesn't end with .png or something like that.

Could this functionality please be fixed so that we can have nice Google Sheets spreadsheets?

Cride5 commented 6 years ago

I don't believe google sheets has support for SVG images yet. Try adding this image for example: https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/gallardo.svg

If the server is configured for raster image conversions (by installing ImageMagick), then it should be possible to include images by using the fmt=png option. The server on cube.crider.co.uk does not support this because of bandwidth issues.