Excel formulas in JavaScript
github.com
github.com
(For English-only speakers: Excel's translation to other languages goes as far as translating function names, thus rendering non-English Excel users' knowledge useless when confronted with an English Excel. E.g., IF(ROUND(A1)=1,B1,C1) in English Excel is JEŻELI(ZAOKR.DO.CAŁK(A1)=1,B1,C1) in Polish Excel -- yes, with all those funky non-ASCII letters.)
That's actually pretty neat. Power of storing your equations in a binary format instead of plain text, I guess.
Fun fact: Some old versions of Excel even had a localised VBA ... using ZeichenF instead of String and other oddities made that a very weird experience.
I guess that's the advantage to the old Word Perfect approach of function-keys for everything (provided you have one of those nifty overlays that show you all the key-commands).
It's really easy to implement the easy parts of spreadsheets, getting the hard parts right is why Excel continues to dominate the space.
Seriously, how much does doing a simple "Select Distinct" suck in Excel?
(I know you can do filter => unique only => copy somewhere) but it's stupidly slow.
Slightly related... I reckon a command line / ncurses version of Excel would be really useful. Am I crazy?
e.g. something like http://upload.wikimedia.org/wikipedia/en/e/ec/Lotus-123-3.0-...
Spreadsheets are a pretty useful and powerful tool when it comes to doing ad-hoc data analysis, but it's kind of annoying to get data in and out of them from command line tools.
I have no idea how easy it is to pipe input into and out of it, but it certainly want designed for it.
I would love a maintained {n,}curses mode spreadsheet that can handle excel1040.com.
I fear that JavaScript's use of floating point as its single numeric type is likely to create surprising results for the unwary. I have come to the suspicion that the longevity of Excel's dominance is in part due to a sophisticated system for inferring numeric types.
There is some fancy logic to format numbers, however (including some mess for date codes). http://oss.sheetjs.com/ssf/ is a pretty decent implementation in JavaScript.
http://msdn.microsoft.com/en-us/library/office/bb687869%28v=...
Huh? Doesn't Excel just treat everything computationally as doubles and sometimes display them as integers? As far as "sophisticated systems" for dealing with numeric types go, that's fairly weak sauce (and quite easily doable in JavaScript, which already does the first part).
Many people would be fine to use other spreadsheet software but why bother going through the bother of researching and downloading and learning that software when your company probably has Excel licences and you've got some entry level training that used Excel?
That dominance has other effects. There is a huge amoun of support (training courses; books; Usenet groups and forums; Magazine articles; other people in the office; etc) for Excel that don't translate immediately to Excel. There are very many third party tools to help you do stuff in Excel if you really need it to. And Excel is probably some people's first introduction to programming. (Which is perhaps a bit scary.)
I speak as someone who loves gnumeric and LibreOffice btw.
As for the unimplemented.js formulas, for Gamma you could use the lanczos approximation, it's easy to convert the C code of it which you can find on the internet, to JS.
AVERAGE(homework1, homework2) * 0.2 + AVERAGE(exam1, exam2) * 0.8
for the final grade. We used rhino for javascript and the service was built on jsp/servlet. It also had access controls so different readers/GSIs had access to different students and columns, and students could see their own grades. Everyone hated Blackboard and loved what we built, but unfortunately they couldn't find anyone to maintain it after I graduated (I was the only person working on it shortly after I joined). The service was shutdown a couple years after I left.
EDIT: someone already thought about combining those libraries: http://SheetJS.github.io
It all makes me think that some in the financial industry think this is some sort of trade secret.
[1] https://raw.githubusercontent.com/sutoiku/formula.js/master/...