-
Junior Member
Read excel values into script without opening excel
hi,
I would like to get values from excel sheet without having to open the excel application. The code right now i have with me always opens the excel sheet and then reads from it, instead is there a way to read the values without opening the excel workwook.
The code is
dim sExcelObj
dim sWorkBook
dim sWorkSheets
dim sValue
set sExcelObj = CreateObject("Excel.Application")
sExcelObj.Visible = true
set sWorkBook = sExcelObj.Workbooks.open("c:\book1.xls")
set sWorkSheets = sWorkBook.worksheets ("Sheet1")
sValue = sWorkSheets.cells(3,1).value
Thanks in advance
Regards
Nemish
-
Expert Member
Re: Read excel values into script without opening excel
Try commenting the line of code -
sExcelObj.Visible = true
I suppose that should do the trick !!
Cheers....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules