Solved

Visual Basic connect to Excel file

Posted on 2013-01-30
3
391 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
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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

820 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