Previously working code w.r.t Sys.OleObject("Excel.Application") not working with 12.42
Hi,
I had the below code working absolutely fine in TestComplete version 10. I have revisited it only to find it not working in version 12.
//No Issue
var book = Excel.Workbooks.Open(inputFileName);
//Issue 01:
//The following code is no more working and error is displayed here saying
//TypeError: book.Sheets is not a function
var sheet = book.Sheets(desiredSheetName);
//Issue 02 (Intellisense popup)
var sheet2 = book.Sheets.
//(here, intellisense causes the popup to appear highlighted in the attached screenshot)
//5. Identify the desired data row as per the testCaseId and caseNumber variables value
//row = 1 because this is the first row on excel sheet.
var row = 1;
var desiredRow = 0;
//Find the last row number that is used on the Excel Sheet. This is the limit
var maximumRowNumber = sheet.UsedRange.Rows.Count;
……
The input excel file is the same. Moreover, intellisense pops up a dialog calling for file usage instead of displaying the available methods and properties. Please find the attached image.
I am using the following:
1. MS Excel 2016 32 bit.
2. TestComplete 32 bit.
3. Windows 64 bit.
4. Microsoft 12.0 Access Database Engine OLE DB provided 32 bit version of installed.
5. My excel sheet is 'Microsoft Excel 97-2003 Worksheet (.xls)'
Help is urgently required.