Forum Discussion

DCat1223's avatar
DCat1223
Frequent Contributor
8 years ago
Solved

Execute MS Excel Macro from TestComplete script

Good afternoon.  I have a web app that is using Excel data.  I am wondering if there is a way to filter the Excel data from TestComplete.  I have tried to exceute the following Excel macro from TC: ...
  • HKosova's avatar
    HKosova
    8 years ago

    Try this:

    function Test()
    {
      var excel = Sys.OleObject("Excel.Application");
      excel.Visible = true;
      excel.Workbooks.Open("C:\\TransferDataM.xlsm"); // replace with your file path
      excel.Run("Re_Sort");
    }