Forum Discussion

WillyPete's avatar
7 years ago

Want to add a new column in excel for a data driven loop

I have a data driven loop that is pulling from an excel spreadsheet.  Four of the six columns are for products the company offers and the company has added a fifth product, so i wanted to add a new column to the excel spreadsheet and add another section to the keyword test for the new product.  I add the column, but when I go into testcomplete, it does not see the new column. As a matter of fact, if delete or change the order of the columns it still doesn't seem to see the change.  I tried to go through the "select data variable" wizard for the data driven loop and re-select the same spreadsheet, but when you get to the step where you select the sheet within the spreadsheet I press the "View Sheet" button and it still has the original sheet layout. I tried redirecting the data driven loop to a copy of the edited spreadsheet in a different folder and it still shows the layout for the old spreadsheet.  Can somebody explain to me what is going on and if/how i can add a column to the spreadsheet for the data driven loop?

  • So, after spending last night thinking about the problem, Shankar's first response got me thinking and I gave the project to a colleague to try on his computer to see if it was just my setup, since what I wanted to happen was working like I expected for Shankar.  My co worker opened the project, edited sheet 1 of the spreadsheet and it worked for him the way it did for Shankar.  I then took his copy of the project and put it on a laptop we lend to contractors and it didn't work there.  Then I realized the problem, my co worker edited sheet 1!  When i was opening the spreadsheet it was defaulting to sheet 4 which is the master list of all available countrys, not the working list for the current execution...  So it was something embarrassingly simple that was the problem, user error.  I had been editing sheet 4 in excel and in test complete I was looking at sheet 1! 

    Thank you for the help everyone!

14 Replies

    • WillyPete's avatar

      It isn't a table variable it is a db variable.  When i try to point a step to the new column in the spreadsheet, the new column isn't listed while all the original columns are. I am not sure i am explaining this correctly. I have attached a screenshot of the spreadsheet and two screenshots of what TestComplete is "seeing". The last column of the spreadsheet, the one i recently added,  is not being shown/seen by TestComplete.

      • Marsha_R's avatar
        Champion Level 3

        Oh, okay, I remembered it wrong from your other question.


        Seems to me that the last time I did this, I had to delete the db variable from the project and start over in the wizard.  There wasn't another way to alter the columns.