一种编辑具有不同值的表的多行的方法

So the thing is that i want a way to edit multiple rows of a table by providing a excel sheet kind of feel. The user should be able to enter values for different rows in the form, and once the save/submit is clicked all entries in the table must be updated.

I have a problem with figuring out how to implement this in my project. can anyone please tell me how i can go about having this interface in code?

There are lot of JS frameworks (dojo, extJS, etc) which can help. As for me, i like DHTMLx one

One idea would be to map the row data structure (i.e. the fields of each row) to a value object. Then each row that is edited will be saved to an array. Then for each element, or object, in the array, you will build an update query and execute it.

This historical essay can help you get started:

http://www.atariarchives.org/deli/spreadsheet_program.php

One thing that I didn't see covered is that you have to look out for circular references, the simplest kind being A1=A2, and A2=A1. Graph theory gives you tools to manage these errors.