I can't see anywhere in the code where you're actually trying to do this. Do you have any javascript to work with your HTML table? Is there a form with buttons for clear/delete/add row that you're not showing in your code?
I can try to help with specific problems, but I'm not going to write an entire Excel GUI.