Are there any simple javascript spreadsheet widgets? [closed]
I need to create a simple web-based expense calculator. We're using asp.net web forms, and each cell will be a text box. The goal is to persist each value (but not the totals) to a database - so I'll have an expense table, and an expense_day table which will have the values for each row of text boxes.
There will be a week's worth of rows, and 6-8 columns. Each row needs to be totaled up, as does each column.
Is there a simple javascript framework that will do this? We're already using jquery, but I don't mind including another small specialized library if it will make this functionality easy.
Update:
Something like the solution described in this question expanded to also total columns would be ideal.
Have a look at this jQuery spreadsheet.
It looks like it uses Themeroller, which is pretty neat.
You could start with DataTables, and then use its API to add a row containing the totals.
This is probably still more complex than you need, but the ExtJS data grids could do what you want:
Here is a demo using their editable data grid (doesn't calculate totals): http://dev.sencha.com/deploy/dev/examples/grid/edit-grid.html
Here is a demo that calculates totals at the bottom. (It's also demonstrating grouping, which you can probably ignore): http://dev.sencha.com/deploy/dev/examples/grid/totals.html
You can see the rest of their samples here: http://www.sencha.com/products/extjs/examples/#sample-3
They have screencasts showing how to use their grid controls: http://www.sencha.com/learn/Screencasts
精彩评论