I can't find your last post , so I reply your question here.
I checked your code. This line caused an null object reference error:
So you should erase this line. If you want the grid data to be uneditable, you may do like this:
ExcelWeb1.EditMode = false;
Have a nice day.