Results 1 to 2 of 2

Thread: excel

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 1999
    Location
    St. Louis, MO USA
    Posts
    21

    Post

    We are trying to read an excel file from our application. We are wanting to read a certain column. Is there a way to do this??

  2. #2
    Lively Member
    Join Date
    Dec 1999
    Location
    Karlsruhe, Germany
    Posts
    122

    Post

    No problem, if you have MS Excel on that machine:

    Select in menu Project - References the MS Excel Object Library"

    suppose the value is in cell C8 in file c:\temp\test.xls your code is:

    Dim objExcel As Excel.Application
    Dim readvar As Variant

    Set objExcel = New Excel.Application
    objExcel.Workbooks.Open "c:\temp\test.xls", , True
    readvar = objExcel.Range("c8").Value
    objExcel.Quit
    Set objExcel = Nothing

    MsgBox readvar


    RogerH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width