Quote:
but got error...
When you ask for hep, it is a good idea to give details on the error.
Try/Catch structure exist to hide errors, it is a bad idea to use them while debugging your code. Error system normally tells you the reason and position of error, it is a great help.
You need to know that an excel cell is an object, not a string or a number.
Try:
int val = xlWorksheet.Cells[index, 5].Value;