TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Excel formulas in JavaScript

102 pointsby clxlabout 11 years ago

12 comments

nathellabout 11 years ago
Any support for i18n?<p>(For English-only speakers: Excel&#x27;s translation to other languages goes as far as translating function names, thus rendering non-English Excel users&#x27; 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.)
评论 #7639142 未加载
评论 #7639089 未加载
评论 #7640499 未加载
评论 #7640457 未加载
dhotsonabout 11 years ago
Very cool!<p>Slightly related... I reckon a command line &#x2F; ncurses version of Excel would be really useful. Am I crazy?<p>e.g. something like <a href="http://upload.wikimedia.org/wikipedia/en/e/ec/Lotus-123-3.0-dos.png" rel="nofollow">http:&#x2F;&#x2F;upload.wikimedia.org&#x2F;wikipedia&#x2F;en&#x2F;e&#x2F;ec&#x2F;Lotus-123-3.0-...</a><p>Spreadsheets are a pretty useful and powerful tool when it comes to doing ad-hoc data analysis, but it&#x27;s kind of annoying to get data in and out of them from command line tools.
评论 #7640374 未加载
评论 #7641825 未加载
评论 #7642014 未加载
评论 #7644130 未加载
评论 #7643028 未加载
brudgersabout 11 years ago
I honestly admire the thought and effort that went into it.<p>I fear that JavaScript&#x27;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&#x27;s dominance is in part due to a sophisticated system for inferring numeric types.
评论 #7640547 未加载
评论 #7642052 未加载
评论 #7641997 未加载
Aardwolfabout 11 years ago
I&#x27;ve been trying to find which js file has the actual meat of the implementation, but didn&#x27;t manage to find it. function.js seems the biggest candidate, but didn&#x27;t contain that much. The rest are all minified other JS libraries or bootstrapping. Any hint on where the actual mapping of names to formulas, and implementation of the formulas, is? Thanks.<p>As for the unimplemented.js formulas, for Gamma you could use the lanczos approximation, it&#x27;s easy to convert the C code of it which you can find on the internet, to JS.
评论 #7639218 未加载
评论 #7640394 未加载
khcabout 11 years ago
This reminds me of my college days. At Statistical Computing Facility at UC Berkeley, a grad student and I (I just finished 1st year at the time) built a web-based spreadsheet for tracking students&#x27; homework and exam scores. We called it StatGrades. One feature that it had was that you could write javascript for each column for calculation&#x2F;validation. I looked at the excel help docs and implemented most of the relevant&#x2F;useful functions, so people could do something like:<p>AVERAGE(homework1, homework2) * 0.2 + AVERAGE(exam1, exam2) * 0.8<p>for the final grade. We used rhino for javascript and the service was built on jsp&#x2F;servlet. It also had access controls so different readers&#x2F;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&#x27;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.
ozhabout 11 years ago
Well done, but I fail at seeing how that could be useful?
评论 #7638939 未加载
maartenbaabout 11 years ago
Cool! Pretty similar to what www.phpexcel.net does for PHP.
chiphabout 11 years ago
They even included IRR, which is pretty impressive.
评论 #7640180 未加载
评论 #7640317 未加载
baconnerabout 11 years ago
This plus something like crossfilter and you&#x27;ll really be able to build.some exciting in browser data exploration apps. Cool stuff.
Robin_Messageabout 11 years ago
What licence is this under please? (MIT preferred!)
评论 #7639042 未加载
评论 #7640514 未加载
robmcmabout 11 years ago
Is there a demo?
评论 #7639798 未加载
doppenheabout 11 years ago
very nice thanks