Show HN: Quadratic – native JavaScript support in a spreadsheet

quadratichq.com

112 points by Manchego79 a year ago

We built JavaScript natively into a spreadsheet as a cell language. Use JS to analyze and work with data in a high-performance spreadsheet built on Rust and WASM. Quadratic also supports SQL, Python, and formulas.

The goal with Quadratic is to build a modern, high-performance, source-available spreadsheet for everyone. From technical developers to users who have never written code.

Sharing our JS launch with everyone today to see what you build in Quadratic.

mattlondon a year ago

Genuine question: How is this different from Google sheets? I don't see much here that I've not already been doing for years in Google sheets (except native python I guess - JS, SQL, fetch() etc has otherwise been there for ages and it's all free)

Also the logo looks a lot like Microsoft? I am not colourblind but it might look even more similar if you are?

  • attilakun a year ago

    They seem to execute JS locally in the browser. Google Sheets makes a network call for this, which results in a laggy experience. I ran into this while I was developing my own Google Sheets add-on [1] which allows inline definition of JS within Sheets but the lag makes the UX subpar.

    [1]: https://www.evaljs.net/

  • Ashwinning a year ago

    This looks really awesome! But same question here:

    GSheets has let me write JS (Google Script) in the spreadsheet (w/ multiplayer, free db & API hosting like features with a little bit of JS, ++) and now has some Gemini support rolling in.

    Excel is rolling out support for Python and Jupyter as well.

    I'm trying to wrap my head around who the ideal user/customer is here w/ a hair on fire problem, and what problems are being addressed that are overlooked by the 2 most popular spreadsheet tools.

    • Manchego79 a year ago

      Performance and creating a first-class experience supporting coding languages natively... With legacy systems like Excel and Sheets, they are adding piecemeal upgrades with not necessarily the best experience or performance. As we're in the early stages, we're focused on developers, engineers, and data folks who feel frustrated with the technical limitations of legacy offerings.

    • mcdonje a year ago

      I can't speak to Google Sheets, but the Excel support for Python is currently severely lacking and poorly thought out.

      People want VBA to be replaced with Python, JS, or something else widely used and respected. Typescript would be good.

      That's not what's happening. They're adding in piecemeal functionality that doesn't necessarily solve any problems or fit into the ecosystem.

  • Manchego79 a year ago

    We're focusing on performance (built on WASM and WebGL). Quadratic speaks multiple programming languages fluently and executes in the browser on your GPU. We connect natively to popular data sources, are source-available, and can be self-hosted. It's a modern reimagining of what a spreadsheet is and does.

attilakun a year ago

Do you evaluate JS using a web worker in the browser? https://github.com/quadratichq/quadratic/blob/qa/quadratic-c...

How effective is this as a sandbox, are there any know (security) tradeoffs? I was using QuickJS for my previous projects but I'm wondering if yours is a better solution (it's certainly more performant).

  • Manchego79 a year ago

    Yes, it’s running in a web worker. It still has access to the browser, so running code in the worker has the same privileges as regular workers. The only communication with the main thread is via socket messages.

Onavo a year ago

Note that they have a GitHub but they are not open source.

  • Manchego79 a year ago

    Correct, our license is Source Available to be as open as possible while reserving commercial rights, which we believe will ultimately enable us to build the best product for users.

    • victor106 a year ago

      What does "Source Available" mean exactly?

      Does it mean all our source code is on Github but you cannot use it to host your own instance for commercial purposes but okay for personal projects?

      • Manchego79 a year ago

        You can read our license on our GitHub. The "summary section" reads pretty quickly and outlines what is permissible and what is not.

      • dest a year ago

        More probably code available on demand but without any license attached

        • sswatson a year ago

          No, the code is available on GitHub and there is a license. It permits personal use.

zelphirkalt a year ago

Emacs org mode with org babel allows you to use many programming languages in its spreadsheets, for at least small sizes of spreadsheets, or multiple spreadsheet throughout the document. There can be some friction though, converting strings to other types, to perform calculation.

dest a year ago

Interesting product. We would use that as a backoffice that would be self hosted, fetching from and pushing to backend APIs. Is that use case on your roadmap?

Basically an alternative to Google sheet with JS macros in it. Gsheet is no good for us because we have data protection requirements.

TheTaytay a year ago

I’ve been looking for exactly this. (For Python to be specific, but I see you support that too.) Nice!

What are the limits on number of rows, data in cells, and number of columns? I saw you say “infinite” on one blurb but couldn’t find reference to limits anywhere else.

  • Manchego79 a year ago

    Our last test was ~5 million cells. We're making performance improvements with almost every release. Building on WASM and WebGL, we aim to be highly performant and handle relatively large data sets (not necessarily big data). If you have a data set you'd like to test, we'd love feedback!

xiaodai a year ago

These approach has been tried so many times and has failed so many times that it’s not funny

  • etbebl a year ago

    I guess I wasn't around to see it; do you mind saying why it's failed? Well, I don't know if it's commercially viable, but just speaking for myself I've been looking for something like this for a while.

    • ies7 a year ago

      The ones who use spreadsheet usually don't write code well.

      The ones who code usually don't like spreadsheet.

      • etbebl a year ago

        What gets me is that even if you don't code much, if you're using a spreadsheet with formulas, in that moment you are writing code, and doing so in an awful, awful language. Sure, "SUM" is easy, but the moment you have any kind of conditional logic it gets pretty hairy. Maybe there's something about traditional spreadsheet languages that makes them easier than, say, numpy for non-coders, but I don't see it.

      • Manchego79 a year ago

        That's one of the reasons we started building Quadratic, it's a spreadsheet where everyone - technical or not can work with data in the same place. With our AI integration, anyone can start writing JS or Python for complex analysis or mix in formulas for simpler computations.

    • xiaodai a year ago

      U can still google resolver one or was revolver one. It was bascilly the same thing but python.

    • Manchego79 a year ago

      If you give Quadratic a try, we'd love to hear your feedback - there's a button in the app :)

cloudking a year ago

How does your product differentiate from Google Apps Script? I see you can execute JS within a cell, but why is that a better UX than keeping the code separated like Apps Script does?

  • Manchego79 a year ago

    Quadratic is built for doing analytics, and a native JavaScript experience where you're in the weeds with the data just felt better. We wanted JavaScript to be a first-class citizen in the spreadsheet, as formulas are treated first-class in most spreadsheets.

    When they're separated, the experience feels bolted on (to us). Being native means supporting existing libraries like Fetch for APIs, chart.js for charts, brain.js for ML, etc., not to mention performance!

fshafique a year ago

It's like taking the data-science notebook model (eg. Jupyter Notebook) and using spreadsheets instead.

  • freshlentils a year ago

    yeah - seems like in enterprises ppl still want spreadsheets, but more and more people also want code, spreadsheets + code

fermuch a year ago

I've tried to use `fetch()` and it works. How did you handle that from WASM? Or is it cached?

  • Manchego79 a year ago

    JS executes in a web worker.

babyent a year ago

Nice. How long you’ve worked on building it? Is it released today?

  • Manchego79 a year ago

    Quadratic has been in BETA for quite some time. We're just announcing the release of native JS support. You can use it today for free :)

oliveralbertini a year ago

Can you get through https api the data on the spreadsheet ?

  • Manchego79 a year ago

    If you were asking, "Can I use an API to access data in my sheets from other apps/services?" - no, not today, but we'll add that at some point in the future.

    Or if you were asking, "Can I query APIs to get data onto the spreadsheet?" Yes, you can do that today in Quadratic with Fetch() in JS or Requests in Python.

pmarreck a year ago

That's a neat idea. How did you lock down security?

  • Manchego79 a year ago

    Is there anything specifically about security you're curious about?

    We're also offering a self-hosted version you can deploy on your own cloud, env., or Docker container.

    • pmarreck a year ago

      I guess, since all the JS runs locally, you don't have to worry as much about things like privilege escalation?

sahmeepee a year ago

Datat visualizations?

  • Manchego79 a year ago

    For visualizations, we support Chart.js. You can also use our built-in AI to help write the code.

    • sahmeepee a year ago

      I'm referring to the typo in your very first heading, unless datat visualisations is a term I don't know.

      • Manchego79 a year ago

        Thanks for the heads-up on that.