

Show HN: SheetSQL – SQL Engine inside Google Sheet - zhuxuefeng1994
https://github.com/Xuefeng-Zhu/SheetSQL

======
mistermann
It's absolutely ridiculous that this type of functionality isn't a native part
of Excel, I was doing something recently in Excel that should have been
trivially simple but because of the lack of obviously useful functions like a
multi-column VLookup or Match function, the hoops you have to jump through are
insane and brittle.

One thing I hope changes with Microsoft's seemingly new culture is this
deliberate crippling of product functionality so as to not cannibalize
revenues from other projects. Another good example is MS-Access - such a
highly productive environment, but some fundamental shortcomings in the design
make it totally unsuitable for projects beyond a certain size.

------
hliyan
A slightly different approach to row/column access in Google Sheets:

[https://github.com/hliyan/magpie/blob/master/lib/gasp.gs](https://github.com/hliyan/magpie/blob/master/lib/gasp.gs)

    
    
      /**
       * Returns a sheet if only one parameter is specified else a range
       *
       * USAGES
       * $('sheet1')
       * $('sheet1', 'A1')
       * $('sheet1', 1, 2)
       * $('sheet1', 1, 2, 10, 10);
       * $.sheet = $('sheet');
       * $(1, 2)
       * $(1, 2, 10, 10)
       */
    

I wrote this as a hobby project some time ago.

------
frik
We need the WebSQL HTML5 standard - a client side relational database,
somewhat comparable to the client side NoSQL offering IndexedDB.

Chrome, Safari, Opera and their mobile counterparts have a WebSQL
implementation. Absent are Firefox and IE/Edge. There is no technical reason
not to implement it.

~~~
gfodor
This was presented at I/O this week:

[https://github.com/google/lovefield](https://github.com/google/lovefield)

~~~
frik
Thanks for the info! It seems Google see the need for it - great.

Announcement from Nov 2014: [http://google-
opensource.blogspot.com/2014/11/lovefield-powe...](http://google-
opensource.blogspot.com/2014/11/lovefield-powerful-javascript-sql-
like_17.html)

Video of a recent presentation:
[https://www.youtube.com/watch?v=wRiI4p5Uk4E](https://www.youtube.com/watch?v=wRiI4p5Uk4E)

Lovefield actually uses WebSQL in certain cases: _WebSQL backstore shall be
considered a gap-stopping patch 18 and will be removed as soon as Apple fixes
IndexedDB bugs in Safari._ \--
[https://github.com/google/lovefield/blob/master/lib/backstor...](https://github.com/google/lovefield/blob/master/lib/backstore/web_sql.js)

I wonder why the would remove WebSQL support? Isn't it faster to rely on a
native C library in the case of Safari (WebSQL uses SQLite) than riding
piggyback an SQL layer on top of IndexedDB on top of SQLite as it is the case
in Firefox?

------
fiatjaf
Anyone reading this can be interested in
[http://thingiequery.com/](http://thingiequery.com/) which is a new and
powerful addon that implements SQL inside Excel.

------
anewhnaccount
Is it possible to make this available via Add-Ons or is the only way to copy
paste all the files into the script editor?

(Really neat idea by the way -- looking forward to hopefully bring some of my
SQL skills to bear on my accounts.)

~~~
zhuxuefeng1994
Thanks for suggestion. I have tried to follow the instruction here
[https://developers.google.com/apps-script/add-
ons/publish](https://developers.google.com/apps-script/add-ons/publish) to
publish SheetSQL as an add-on, but I was stuck at step 4, since I did not see
"Deploy as Sheets add-on" the option after I performed the previous steps.

~~~
anewhnaccount
I'm not sure. I've also tried to publish an add-on but couldn't figure out
what any of it meant. Google Drive and Docs seems to be forever changing the
way things work and then only rolling out the features to certain people (to
do with geography a/b testing)? It makes it kind of confusing tbh.

