Forum Discussion

Egg's avatar
Egg
Frequent Contributor
8 months ago
Solved

Excel-Write value

Hello. I wonder about 'Excel- Write Value' Operation. 

 

I wanna write value using Data Driven Loop Operation in 3 keywordtest. 

and I compose keywordtest like below. 

 

keywordtest 1- Write value in  row A. (A1, A2, A3) 

Keywordtest 2- Write value in row B. (B1, B2, B3) 

Keywordtest 3 - Write value in row C. (C1, C2, C3) 

 

and then I Run 3 Keywordtest. (Using Project Execute Plan ) 

In Keywordtest 1,  Excel - Write Value Operation operate well. 

but  in  Keywordtest2,  That Operation occur error. 

( and After Error, I rerun from error. then Operation operate well. that write a value in excel.)


Error Message is   'Failed to delete the 'C:\User ~ my  excel file's path' . 

 

How I do that?  It's a Program's Bug? 

Please Help ~~ 

  • Can you post, what you have done so far?

6 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    For every Excel keyword operation call, it will perform open file -> read/write to file -> close file. However, on the next call, if the file has not been closed in time, then it will fail.

     

    The "delete" could be due to TC creating a temporary Excel file to perform the operations, before writing it to the main file.

     

    • Egg's avatar
      Egg
      Frequent Contributor

      Thanks your answer. 

      I will add Delay time before write excel process in second time. ( is that right ..? haha.....) 

       

      And I also wonder about excel-write in Data Driven Loop. 

      I'm using excel-write value   in DDL. 

      So I expect excel write value +1 row automatically in DDL, 

      While Execute DDL, First time write value in A2, then Second time Write in A3. 

      but my script only wirte in A2. (actually, I input cell value: sheet1!A2) 

       

      Finally All I wanna do is 

      while execute DDL , gradually write value in Excel  

      How can I do that? 

      Please share your tips! 

      Thank you. ! 

       

       

    • Egg's avatar
      Egg
      Frequent Contributor

      Thank you. but I'm not used to cord. 

      So I used 'Add row' Operation in Keywordtest. 

      and I have done my purpose. 

      thank you. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Can you post, what you have done so far?