xem / sheet Goto Github PK
View Code? Open in Web Editor NEWa tiny Excel clone
License: Other
a tiny Excel clone
License: Other
Hi - what excel formulas does this project support?
If anyone can answer, I look forward to hearing from you.
First: Its (again) a very impressive code.
So, I tested it with
A1: 3,14
B1: 3,00
C1: =A1+B1
On "full with headers" it results in 3,143,00
On "minimal" it results in a NaN.
On "Full" it results in 3,143,00.
Its not really a bug, just my two cents.
Keep up your impressive work! :)
I'm wondering why a[i]-~j
isn't used instead of a[i]+-~j
.
It's that obvious that I'm probably missing something, but what?
If you create a downward or rightward reference in a cell, the reference will be broken if it refers to a formula cell. For example, set the following formulas/values in the first column of the example spreadsheet:
A1
: =A2
A2
: =A3
A3
: =A4
A4
: 1
Focus cell A3, then focus cell B3. You'll see a NaN appear in cell A2.
I tried modifying the localStorage
- and labels-enabled version of the script to fix this issue (and also support recursive formulas properly) and the smallest I can get is 278 characters (up from 257):
<script>(o=b=>{for(j in a)for(i in a)y=a[i]+-~j,f=eval(y+`_=a=>${y}.value=eval("y.a"+l.${y}.replace(/[A-Z]\\d/g,'+$&_()')+"||[l.${y}]")`),b?document.write([["<p>"][i]]+y+`<input onfocus=value=[l[id]] onblur=l[id]=value,o() id=${y}> `):f()})(o(a="ABCD",l=localStorage))</script>
The fix for the other script versions may vary from this one - I haven't attempted to golf a fix there.
I've also used ES6 string-interpolation to save a few bytes. You could probably trim a few off the existing one using that technique.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.