Forum Discussion

VasanthVijay's avatar
VasanthVijay
Contributor
11 years ago

Test complete application Crash.

Hello,

          I want export excel from my application and then read data from excel below example, i used at that time my test complete get crash.





function
ReadDataFromExcel()

{

  var Excel = Sys.OleObject("Excel.Application");

  Excel.Workbooks.Open("C:\\MyFile.xls");



  var RowCount = Excel.ActiveSheet.UsedRange.Rows.Count;

  var ColumnCount = Excel.ActiveSheet.UsedRange.Columns.Count;



  for (var i = 1; i <= RowCount; i++)

  {

    var s = "";

    for (var j = 1; j <= ColumnCount; j++)

      s = s + VarToString(Excel.Cells(i, j)) + Chr(13) + Chr(10)

    Log.Message("Row: " + VarToString(i), s);

  }



  Excel.Quit();



}





Thank in advance.
  • Hi Vasanth,

     


    Does the issue persist with TestComplete 10.40? Please update to this product version if you haven't done this yet.