contentEditable is a terrible hack and difficult to use when you only want a subset of features. You need to blacklist a bunch of events like pasting, keyboard formatting (e.g. ctrl+i, drag and drop and inserting new lines.
I am the dev of the plugin. Thanks for the info, I will try to address that. Notice that the performance is much better when you turn off row/col headers.
That is the newest feature and I am sure it can be optimised.
It would be the best if you could help me with the plugin by issueing a ticket in GitHub. I do this for my own startup (www.giraffeapp.com) and I have to split time between this and other tasks.
Is there any JS spreadsheet library that falls-back to <table>s for non JS-enabled browsers?
Spreadsheets/tables are a great way to structure data. However, JS-'enhancing' such data makes scraping the data much more difficult. I am a little bit concerned that the web has been moving more and more away from connected data and towards isolated apps.
For just viewing and editing spreadsheets without social features, you can ignore the servers included, the javascript widget works just fine by itself.
Dan Bricklin co-authored VisiCalc, the first spreadsheet program for the masses.
DataTables is what we're phasing out in favor of SlickGrid (most likely); it simply croaks when you have 1000's of rows...too many DOM objects in the browser.
Of course, the paged option might alleviate that somewhat, but requirements won't let me use that.
Have you taken a look at the deferred rendering and/or Scroller options for DataTables ( http://tinyurl.com/cr5usea and http://datatables.net/extras/scroller/ )? These can provide a significant speed increase - depending on your data source for the table and how you want to configure the table.
I've been looking for something like this for a while to provide copy / paste address book import functionality from Excel or any spreadsheet program. Google Apps script was interesting because you could do complex rules like adding validation but I don't think it's really designed to be dropped in to your site to be used by anonymous users and having Google Spreadsheets as a dependency isn't ideal.
However, for simple input this looks great. What else is out there? I saw the projects listed on this project's github but those weren't the same - just start editing and pasting.
1) JSON is what is used to init the table code right?
2) If it is JSON, JSON can contain logic? As in the match logic?
3) What is the function name? Is it match? Where does it get called from? How many paths are there to call it?
4) CSS style is hard coded into the (I think) JSON string, is mixing data (JSON), programming logic (if expressions) and CSS styling really the best new way to do UI development? So back in the day before MVC when we used to mix this stuff; we were doing it 'right'?
JavaScript is good for some things but WebGL and Excel-like spreadsheets are too much if not just for performance then also for maintainability, IMO.
I had a summer internship in high school that foundered when we realized that we needed a grid tool to display and edit data in a web browser. The rest of the summer was spent trying to build this tool in Java.
What I would like is a super-easy server-side library that allows persistence for a table like this. Since I had a crap day at work where I got no development work done, maybe I'll bang this out tonight at home.
This is what you're talking about. http://obeleh.thruhere.net/
Wait for it to load. It's connecting to the database ;)
NOTE Still in development ;)
What I've done is I wanted to have a Ms Access like application on the web. Everything "real time".
As datagrid i use SlickGrid. Every change is being sent to a nodeJs webserver using NowJs. The change is then saved to a mongoDb database. When a change is saved all clients that are viewing that table get an update with the new data.
On the right is my "meta" table. This table describes all columns that are in the database. The data in the meta table is only saved when you click save. But all the data in the left table is real time.
To see the real "power" of the application open two browsers and make sure you can see both. If you have two separate PC's this will also work. So now you have the same datagrid twice. Now when you do a change in one datagrid you will see that that change has been pushed to the other datagrid as well.
The datagrid has multi-column-sorting, selection, copy-paste and delete. I'm working now on having Comboboxes so that you can have a Cities table and a Persons table and you can select the right city for each person. The thing is, I need to keep my combobox options in sync with the database as well. And I want to store the ObjectID and not the CityName for example. Because names can change. ID's don't.
can't do any excel type formulas or functions... that's a limitation...
very cool that you can copy and paste though. I've often wanted a way for users to copy excel data into an app as opposed to making them inport a csv...
This just saved me a ton of time! I'd been planning doing implementing something similar to this in my startup's webapp. The flexibility this provides is just awesome and should hopefully make things much easier.
Thank you Marcin Warpechowski / Giraffe for creating this and uptown for submitting this.
I don't think that linked table supports equation. It should be possible to add them. You don't have to look further than google docs that it is possible. I did write excel like language in the past and it was quite simple. Obviously there is performance hit when comparing js to native, but it should be fast enough. Sorry but I cannot give you my code because it was written as my job, but as I said writing something like that should not be a big challenge.
I am curious about other table/grid editors for other JS libraries (for example ExtJS, Dojo, Kendo UI, Google Closure, ZK). Could you share your experience?
* Here, contentEditable cells on click, arrows up/dn for rows, tab/shft+tab for columns:
http://georgenava.appspot.com/demo/spreadsheet.html
Coincidentally I was playing with that yesterday for a project, but yours is a hundred thousand times better.