Contributions
- 552Views0likes0Comments
Re: Test Complete Unable to load URL from Excel
Hi, Thanks for the answer. I followed this but no success and after digging deep into it, found one error ("Error: Provider cannot be found. It may not be properly installed.") because of which getting above mentioned error ("Error: Operation is not allowed when the object is closed.") I have checked the MS Access 32 bit driver is installed. used this command for installation: c: accessdatabaseengine2016_32.exe /quiet Also Verified that all related softwares(Test complete, MS Office 365 and Access Driver) are 32 bit.578Views0likes0CommentsTest Complete Unable to load URL from Excel
Working on Test Complete Keyword driven framework, which is now migrated from Win7 to Win10. All the environment URLs configuration are in Excel sheet. Issue: During execution once the browser launched URL is not opening Debug: While debugging found one error . Error: Operation is not allowed when the object is closed. Below is the code to read from Excel: Function GetXLSRecordset(strFilePath, strSQL) On Error Resume next Set objConnection = CreateObject("ADODB.Connection") 'Create Connection srting strConnectionstring = "Provider=Microsoft.ACE.OLEDB.16.0;" & _ "Data Source=" & strFilePath & ";" & _ "Extended Properties=Excel 16.0" Log.Enabled = True Log.Message(strFilePath&"::"&strSQL) objConnection.Connectionstring = strConnectionstring 'Open connection for assgined connection string objConnection.Open 'Create new recordset Set objRecordset = CreateObject("ADODB.Recordset") 'Execute SQL Query objRecordset.Open strSQL, objConnection, adOpenStatic, adLockReadOnly record_Count = objRecordset.RecordCount Log.Message("Record Count: "&record_Count) Log.Enabled = True Set GetXLSRecordset = objRecordset objRecordset.Close Set objRecordset = Nothing objConnection.Close Set objConnection = Nothing End Function --- System Configuration: TestComplete 14.x 32bit MS Excel 16.x 32bit MS Access DB driver 16.x 32 bit OS Win 10 Every time I'll try to print `objRecordset` getting undefined, but it returns the count `objRecordset.RecordCount` Tried all the possible solution found on community support but didn't work, please suggest me some workaround. Everything is working properly on win7 machine.668Views1like7Comments