Hi Team,
I know its possible without try catch , but i need to make use of it.
My task is to extract data from the excel sheet and finally enter those values into the form.
Eg:- Excel data may be (Name) : (Age) : (Country)
___________________John ____ 23 __ Sri lanka
____________________ Alex ____ 27 __ USA
____________________Melvin ____ 35 __ UK
And I want to make sure that I make use of try catch in order to handle the exceptions.
Please note that the exception that are encountered are
- age value is not numerical (this is just example please don’t find logic here)
- the age value cant be more than 100( again just example so don’t find logic here.)
If non of the exceptions occur (form is submitted). But if any of the exception is there then handle them. Like get out some message box(stating the particular exceptions are occured.) and proceed.
So far I have red the data into datatable variable and using the for each row loop to enter the values. Which is working fine.
I am not very much familiar with TRY-Catch. So I need to learn that.
Please let me know how do I do the above thing.
Thanks and Regards,
Engineering Fail