Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A bit off topic, but what I've wanted forever and never found is a spreadsheet that deals in units natively. So if one cell is in Newtons and I divide it by a cell that is in m/s^2 I want the resulting cell to be in grams. Units should propagate through the sheet automatically. Unit prefixes can either be automatic (km, m, mm, um, etc) or fixed as you would with a format setting.

Google calculator is the closest thing I've seen to this, but it isnt in spreadsheet form.

Anyone know of a system that provides this functionality?



Interestingly, it seems there's a Sheets add-on which provides at least some of what you want— unfortunately not with cell metadata, but rather using pairs of adjacent cells for the quantity and units:

https://workspace.google.com/marketplace/app/legendsheet/210...

The dev does a demo here: https://www.youtube.com/watch?v=K6Nvw2q889Q


The only one I know of is org-mode[0]. It defers calculations to calc-mode which handles units.

[0]: https://orgmode.org


Yes this would have been so useful in my lab courses at university. Bonus points if cells could have errors and it could do error propagation.

I started working on this back then but got frustrated trying to make a grid control and gave up :-)


There's always Frink. https://frinklang.org/



R also has a units package. It's mostly used by geospatial libraries.



Never tried it, but Wolfram has a Mathematica plug-in for Excel.

https://www.wolfram.com/products/applications/excel_link/


I remember Mathematica being a bit weak with units actually. Natively there's no support, you have to rely on add-on packages and I didn't have much success with the popular one. But my experience is from version 8 (a while ago) so it may have improved since.


Mathematica 9 and above has had significant improvements in its unit support. I’ve found it to be really good.


spreadsheets barely have distinction between strings and numbers. Units would be another level! I hope that at some point something like a strongly typed jupyter notebook tailored specifically for table inputs would arise and replace some current usages of spreadsheets in office/consumer space.


Haven’t tried it yet since not on Office 365 but there’s a very interesting custom data types feature emerged in Excel just a few months ago https://sfmagazine.com/post-entry/december-2020-excel-add-yo...


GNU units does this, but is definitely not a spreadsheet or anything like a spreadsheet. It might be possible for a spreadsheet to arrange to call it as a back-end, though.

  You have: 100 N / (50 m/s^2)
  You want: 
          Definition: 2 kg


1-2-3 would allow you to plot a function on your graphs. Something that I haven't seen since. The solution now is to build a range and values, but that just adds one extra column of data to massage versus having a reference line covering the domain and range of that particular graph.


There's this: http://www.dimensionengine.com/excel/DEAddIn/

Their description sounds a lot like yours.


Interesting! I do this on paper a lot because that's how I learned in college. Thinking of it. It's composing converters. That should be fairly easy to automate!


Not a spreadsheet, no, (it is more of a freeform worksheet) but SMath Studio is a breeze to work on with units.

It has complete support for units of measurement and comes with most built-in. It can also decompose derived units into simpler forms if it finds a match.

It is free but not open-source.


Not a spreadsheet, but Soulver and NoteCalc allow you to label and reference previous calculations in the same way a spreadsheet does.


Is this for business or personal use? (We're building a spreadsheet product @ Sourcetable.)


This is one of the first uses C++ templates had way back in the early 90s IIRC.


Or a programming language? Or a Python module?


Somebody already referenced F# elsewhere in the thread: https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe.... It will apply unit of measure checks as part of their static type checking.


Beyond simply joining in on the F# love... If you're using Python anyway, then Pint¹ makes unit handling really easy.

¹ https://pint.readthedocs.io/en/stable/tutorial.html


In python there’s the pint module, which works with pandas dataframes, which can read/write excel sheets. So yeah, maybe. Why do anything in excel, except for data entry?


you can do that in mathematica, I think.




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

Search: