Results 1 to 2 of 2

Thread: Read excel values into script without opening excel

  1. #1
    Junior Member
    Join Date
    Feb 2007
    Answers
    2

    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


  2. #2
    Expert Member
    Join Date
    Oct 2007
    Answers
    375

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact