I need a solution for the following condition:
Action is null and material id is null then result is Invalid
Action is value and material id is null then result is Material id is invalid
Action is null and material id is value then result is action id is invalid
Action is value and material id is value then result is action id is created Main01.xaml (23.9 KB)
I observe here:
matid.Contains(â0â) = true
You are checking an integer with Contains which is wrong,
it should be:
Convert.ToDouble(matid)=0
First you should convert that into Double then compare with 0, you canât compare two different datatypes.
you are getting this error because some rows in Column âActionâ do not have any valueâŚ
when a row is empty for any column and you are assigning that rows value to a variable ( in our case it is âactionâ), it does not get assigned as row is empty, hence variable was not initialized and you are getting Object Reference errorâŚ
Solution: instead of checking this string.IsNullOrEmpty(action.ToString()) = true
try String.IsNullOrEmpty(row(âActionâ).ToString()) = true
first thanks for your help @rahatadi.
Currently Iâm doing SAP automation project.
This is one of my requirement SAPAutomation2.xlsx (11.4 KB)
Initially I need to validate this excel sheet
Next if I get any error in middle of the project. I extract that error into excel sheet.
simontanisly my project also executed which means EXCEPTION HANDLING
this is my project Main.xaml (1.2 MB)
yeah exactly right if there is any error occurred first row then I should extract that error into excel sheet. After that execute next row if there is error occurred fetch the error then return to home page execute next row.
Thanks in Advance