4 ms·
My text disappears after I type it in and move on. And why do you call a table an "excel-like" app? Can it so =SUM(); can it do search and replace or the over
by dubcanada 13y ago
My text disappears after I type it in and move on.
And why do you call a table an "excel-like" app? Can it so =SUM(); can it do search and replace or the over 9000 other features of excel? No... it's a table, with a editor.
- hmottestad 13y agotry "=1+2"
- untothebreach 13y agoIt's 30 lines of javascript, what do you expect? This is a cool little project and the negativity is really unnecessary. The author could definitely have chosen a better description, but that is no reason to dismiss it outright.
- perlgeek 13y ago=A1+A2 works for me.
- ondras 13y agoBecause it simulates a subset of excel functionality, namely the ability to reference values in other cells and automatic re-computation of changed and dependent values.
- Mikeb85 13y agoThey made a fully functioning spreadsheet in 30 lines with no libraries. I'm sure adding more functions is possible... You could probably even figure out how to create a SUM function...
- gtramont 13y agoYou can create your built-in functions as this: var DATA={ SUM: function(a,b) { return a+b; } } Nice demonstration of language features, like 'with', that we usually take as 'bad practices'.
- elmin 13y agoThe language is javascript, not excel's, but you can do sum if you like: [A1, A2].reduce(function(a, b){ return a + b; }); You could, of course, write a sum function, and reference it wherever you like.
- icoder 13y agoAh yes, that's actually an interesting side effect of the eval strategy that I didn't realize myself yet. Nice!
- Xelom 13y agoThese comments freak me out. Guys, come on... It's just 30 lines... Great job author, fascinating.
- robmcm 13y agoOn one side I'm like come on guy, it's impressive. On the other, I imagine some PM is going to read this and expect their developers to get a google docs competitor out in a day!
- errnoh 13y agoSure you can, just add the function first: function SUM() { var sum = 0; for (var i = 0; i < arguments.length; i++) { sum += arguments[i]; } return sum; } Now you can do stuff like =SUM(A1, B1, C2) and it works like expected.