Forum Discussion

dpeterson's avatar
dpeterson
Occasional Contributor
11 years ago

Force Recalculation of Datasheet

I'm building data-driven tests that include date/time sensitive information. The data sheets include Excel formulas to do things like compute the current date, the week prior to the current date, etc....
  • AlexKaras's avatar
    11 years ago
    Hi David,



    It is my understanding, that all means that read data from the Excel sheets (e.g. ADO, ODBC, data-driven drivers in TestComplete, etc.) just read data from the sheet. In order for the data to be recalculated, the file must be opened in Excel (which recalculates data on file open). So I think that your approach should be like this:

    -- Open file in Excel using it as a COM server (http://support.smartbear.com/viewarticle/20878/ might provide you with the overall idea of how to do this) before starting your tests. This should update data in the file;

    -- Save updated file and close it (and exit Excel);

    -- Use data-driven approach in TestComplete as usual.