VBScript Excel Object Model

VBScript Excel Object Model It is used to Perform Operations on Excel Application. Excel Application Excel File / Excel Workbook Excel Sheet / Excel Worksheet Create Excel Application Object Syntax: Set variable = CreateObject(“Class value”) example Set objExcel = CreateObject(“Excel.Application”) VBScript Excel Scripting Examples: 1) Create an Excel file Dim objExcel Set objExcel = CreateObject(“Excel.Application”) … Read more

VBScript Excel Object Model Part-2

VBScript Excel Object Model Part-2 1) Read Test data from Excel file and perform Data driven testing for Login Functionality. And write/export Test Result and Error Message to the same file. Dim objExcel, objWorkbook, objWorksheet, RowsCount, i Set objExcel = CreateObject(“Excel.Application”) Set objWorkbook = objExcel.Workbooks.Open(“C:\Users\G C REDDY\Desktop\January.xlsx”) Set objWorksheet = objWorkbook.Worksheets(1) RowsCount = objWorksheet.UsedRange.Rows.Count objWorksheet.Cells(1, … Read more