I am using c# for writing automation result. I have requirement where i have to write result in different sheet of same excel while running automation end to end flow. When my testmethod gives result as pass then i have to write result of that testmethods in sheet1 in below format
Testclassname | testmethodname | pass(yes/No) | time
When testmethod gets failed then write like
Testclassname | testmethodname | Fail(yes/No) | time | exception
How to achieve this in c#??