I want to write values to excel corresponding to the required fileds


I want to write Rest and Pest values in to excel for the condition:

if above condition is not satisfied with table provided, it should replace the value with 0.00

kindly help me in writing logic

You can do it in two ways

  1. Open the file in note pad & simulate human actions

(a) Skip first 5 lines (down arrow)
(b) If fixed with, read the entire line (ctrl+shift+end & ctrl+c), use substring function to read the values
© If tab separated, read word by word (ctrl+shift+rightarrow & ctrl+c),

  1. Read the file using .Net filesystem & apply the above logic

iam assigning all values to repective variable. and iam using if logic
(desc=“07HYS0RE” And xxpott=“ERTYRE”) to satisfy the condition…
if it satisfies i should write respective REST PEST values in excel otherwise write as 0.00 value in excel.

when iam using the condtion it is writing the values in excel correctly. but when iam checking next condition it is replacing first condition values also as 0.00 zeros even first condition is true