Forum Discussion

Raji18's avatar
Raji18
Occasional Contributor
2 years ago

In TestComplete I need to create the Excel with SmartView inbuilt features.

In TestComplete I need to create an excel file with in built SmartView features, and then have to open that excel file on the foreground to work on further automation steps.  I tried to create the Excel file and saved in the C:// temp location, I don't know how to retrieve that excel file from temp location and bring it on the foreground to do the further automation steps using TestComplete ObjectSpy.

 

Any suggestions or sample code would be highly appreciated.  Thanks in advance.

  • Are you trying to test something in Excel or use it for data storage? What exactly needs to happen here?

    • Raji18's avatar
      Raji18
      Occasional Contributor

      Test Scenario is to do the automation testing on excel smartview, at some point I also need to feed this created excel wtih SmartView with another ecel to feed the data. So here are the steps:

      1) Create Excel having SmartView: I created with excelObject = getActiveXObject("Excel.Application"); and some more code to save it at my c:// temp.

      2) SmartView is a feature to make the connection to the database to query & view the result direct into the Excel without actually seeing it into the database side.

      3) I'm able to create and save it at my C:// temp drive, but I need the code to retrieve it from temp location and bring it on the foreground to do the click actions into the excel to make the commention of database.

      So need support on:  Code to retrieve the excel from C:// temp location and bring it on the foreground, so TestComplete ObjectSpy can spy the objects in my Excel for connection.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    What's Excel SmartView features?

    How have you created the Excel file, through TestComplete?

     

    If you can provide us with more information, we should be able to help

  • We have to ask the basic questions when you don't give us enough information in your post because we have no other way to find out what you have already done.

     

    You said you have created the Excel file you need in a temp directory and you want to move it. You can use the aqFileSystem.CopyFile commands to make a copy of it in a new location.

    https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfilesystem/copyfile.html

     

    Try that and then let us know if you still have questions.