?
Solved

Visual Basic connect to Excel file

Posted on 2013-01-30
3
Medium Priority
?
399 Views
Last Modified: 2013-01-31
In order ro connect the Excel file will I need Excel installed on my computer.
See code below.

Private m_oXlsTests As ADODB.Connection
Private m_oRdsTest As ADODB.Connection

   Set m_oXlsTests = New ADODB.Connection
    With m_oXlsTests
        .Provider = "Microsoft.Jet.OLEDB.4.0"
        .Properties("Extended Properties") = "Excel 8.0"
        strFileName = App.path & "\Tests.xls"
        .Open strFileName
    End With
0
Comment
Question by:Idarac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38838722
No, that should not require Excel.
0
 
LVL 9

Accepted Solution

by:
shorvath earned 2000 total points
ID: 38839088
You do not require Excel to be installed on a system in order to use ADO to read and write data in Excel workbooks.

http://support.microsoft.com/kb/278973

For a detailed article using VB6 ADO and Excel see this link:

http://support.microsoft.com/kb/257819
0
 
LVL 1

Author Closing Comment

by:Idarac
ID: 38839494
Perfect
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question