|
-
Dec 28th, 1999, 11:48 PM
#1
Thread Starter
Junior Member
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??
-
Dec 29th, 1999, 01:06 AM
#2
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|