Forum Discussion

raj360logica's avatar
raj360logica
Occasional Contributor
7 years ago
Solved

How to add an Excel file withing the TestComplete project.

Hi There,

 

I have an Excel file that contain data for my scripts i.e username, Password, App URL etc, and its located on my local machine i.e C:\Users\Text.xlsx  and its working as expected.

 

But I want to put this Text.xlsx  file in project somewhere but I am unable to add Excel file to the project. Also I have tried to add it in Stores=>Files its add successfully but unable to see its content.

 

Please help to overcome this issue.

 

Thanks..!

  • Great.....

     

    var path=Project.Path;
    Log.Message(path);

     

    it returns path to the Project file, hence it solved my problem.

     

    Thank you

2 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    Basically, you want the Excel to be there whenever/wherever you copy the project files.

     

    Just place your excel file inside in your project/project suite folder then use Project.Path + "Text.xlsx" or ProjectSuite.Path + "Text.xlsx" in-order to handle your scenario in dynamic way

    • raj360logica's avatar
      raj360logica
      Occasional Contributor

      Great.....

       

      var path=Project.Path;
      Log.Message(path);

       

      it returns path to the Project file, hence it solved my problem.

       

      Thank you