0

I have an excel sheet (located in classpath), which has scenarios to be read and executed.

Once they are executed, I should write back to the SAME excel sheet saying whether the scenario is PASS'ed or FAIL'ed.

How can this be accomplished?

(NOTE: I am able to read the excel).

Kheldar
  • 5,361
  • 3
  • 34
  • 63
KrishPrabakar
  • 2,824
  • 2
  • 31
  • 44

1 Answers1

1

I guess the only way is to create a temporary file of the original file and read the temporary file. Do the validations. Open the original file for writing and display the error message. Finally delete the temporary file :-)

rozar
  • 1,058
  • 3
  • 15
  • 28
  • @rozar Can you please elaborate this ans. that how to create temporary file of the original file and read that temporary file. Also, how to open original file and display the error message and delete that temporary file. Actually I am stuck on the same issue it would be helpful if you revert me. – user2092132 Feb 15 '15 at 06:28
  • @user2092132 Let me explain with the example in the OP. First create a new temporary file (X1) and open the original file (X2). When you read the file X2 do your job and save it in X1. At the end of processing read X1 and copy to X2 and delete X1. – rozar Feb 16 '15 at 23:34
  • @rozar Can you please give me an example or let you know how to do it by giving sample code? It would be helpful for me. Thanks in advance..!! – user2092132 Feb 18 '15 at 16:22