Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
JavaScript-Based Spreadsheet-Like Formulas in Google Docs (chrome.google.com)
74 points by MikaelMayer on Feb 18, 2019 | hide | past | favorite | 23 comments


FYI, on my phone that link takes me to a generic Chrome page saying "You can add new features to Chrome by installing extensions. Visit the Chrome Web Store on your desktop computer...". It would be better to post the blog article (and maybe make a more obvious "get it here" button somewhere in the article for people skimming :))


Thanks. I added a link to the beginning of the blog post.

https://mikaelmayer.github.io/blog/2019-02-13-google-docs-fo...


Related tangent: I like how, in his introduction to Mobx, author MWestrate uses the analogy of spreadsheets (data cells, formulas) to explain mobx observables and computeds.


I explain lots of programming concepts to friends/family in terms of Excel. Truly a wonderful program.


I've seen/heard it called "The biggest and most successful reactive programming tool in the world". Nothing else comes even close.


My coworker also calls it the most abused software in the world. Some people do things that are amazing, and sometimes scary to software engineers.


I'm a bit averse to newly created accounts linking to nondescript plugins.

Here's a blog post discussing the plugin:

https://mikaelmayer.github.io/blog/2019-02-13-google-docs-fo...

> Have you ever wished you could synchronize content within one Google doc? Do you need temporary placeholders that you will replace later? Do you want to generate text? Do you miss spreadsheets in docs?

> If you answered yes to one of these questions, this Google doc extension is for you. It enables you to define names (a.k.a. variables) anywhere in the document, and to insert computations that produce rich text anywhere in the document.


> I'm a bit adverse ...

Besides (what I consider) the introduction of the article, what else do you consider "stilted" advertising language and how can I improve my writing?


I shouldn't have been so harsh, as I was initially scanning against suspicious submissions. I criticized the language because I thought it sounded like a kind of advertising from TV.


btw

averse != adverse


This feedback is unnecessarily critical of a well meaning blog post.


Wrong link?


What do users without the extension see? e.g. would they see "=name is out!" or "MySoft 1.0 beta is out!"?


The extension isn't just a Javascript overlay, it actually modifies the document in real-time while storing a full understanding of the document structure behind the scene, in the document itself (thanks to the Google Docs API). So other users would see "=name is out!" if this is what you've chosen to show on your own interface, or "MySoft 1.0 beta is out!" otherwise. If they have installed the extension, they would be able to access the document structure information, see placeholders and change variables as they like.


This extension stores all formulas as named ranges inside the doc. Because all changes are simultaneously visible by all users, including computing and revealing formulas, it depends on what users with the extension are doing.

This also means that users without the extension can modify any revealed formulas or definitions, and have users with the extension recompute them.


So by creating a table inside the text document, you can essentially make a spreadsheet?


Indeed! However, without range support like A1:A10 or relative references. Besides, values should be defined in order (top-bottom, left-right)

Try to create a 2x2 table like this:

=(/A1=/”Hello”) =(/B1=/”World”)

               =(A1 + “ “ + B1)
Click on Evaluate formula, tadaa. I just fixed a bug to make it work, the publication might take up to 24h.


Source available?


The source is a Google Script. When I try to create a shareable link, either by obtaining the share link or advanced share options, I get the error "Sorry, an internal error has occurred and your request has not been processed.". I'll let you know when it's working again and I'll post the link here.


Use clasp to manage your apps script project and push to Google apps script from a local git repo which you can also push to GitHub.

https://codelabs.developers.google.com/codelabs/clasp/#0


Thanks for the tool. Unfortunately, this makes run-test lifecycle painful -- I just want to launch a procedure and view the result in a Google docs, not git commit -am message and then git push and then refresh and then launch a procedure -- so I'm likely not going to use it


I was using an older version of this and was able to push directly to Google Apps Script / Docs from the repo with uncommitted changes for testing, and then only commit and push to git when I was happy with it.

I wrote stubs for the relevant apps script APIs and was able to run tests locally as well: https://github.com/wffurr/safe-contract-validator/blob/maste...


Thanks, I finally managed to make Clasp work. Here is the source code of the latest nightly version:

https://github.com/MikaelMayer/Sketch-n-Script




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: