| || |
Interop Excel dll
I am using Silk Test Workbench tool for automation. I have a script to read the test data from excel file.
And, have added the assembly reference (Microsoft.Office.Interop.Excel.dll) for the Excel version in Silk Test Script.
When I execute the script, the excel file is getting opened.
Actually, during execution I don't want to see the excel file getting opened.
Could someone help me in this?
I am using the below code to read data from excel.
Dim objExcel As Excel._Application
Dim objBook As Excel._Workbook
Dim objSheet As Excel.Worksheet
Dim rowsList As New List(Of List(Of String))
objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objBook = objExcel.Workbooks.Open(sBookName)
objSheet = objBook.Sheets(sSheetName)
When this code is executed, I do see the excel file getting opened. Actually, I don't want to see the excel file and that's why objExcel.Visible = False has been set.
In my machine, I have both VS2010 and VS2012 installed the excel version is 16.0.6001.1078. The excel is 32-bit.
Can you create as a VBScript and check it? Might be issue on other things like multiple excel installation OR backward compatibility etc..