Multiple choice technology testing

The command used to retrieve data from excel sheet is

  1. Set ab = Connection("srcfilepath ") , Set ws = ab.getdata(sheetid)

  2. Set ab = GetObject("srcfilepath ") , Set ws = ab.getsheet(sheetid)

  3. Set ab = CreateObject("srcfilepath ") , Set ws = ab.getsheet(sheetid)

  4. Set ab = GetObject("srcfilepath") , Set ws = ab.worksheets(sheetid)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In classic VBScript automation for Excel, an object representing the file is retrieved using GetObject, and the worksheet is accessed via the worksheets collection.