Resumen Conexion mediante ADO a una hoja de Excel

Mensaje enviado por Grenville Tryon <gtryonp@afphorizonte.com.pe>

Ojala ayude.

Connect to Microsoft Excel Using OLE DB
Microsoft documentation says you can connect to Excel 97 or Excel 2000 using the Microsoft.Jet.OLEDB 4.0 provider. If you use the Microsoft ADO Data Control, however, you will have problems. From the property page for the ADO Data Control, choose the Use Connection String radio button and click on the Build button. Then, select the database name, choosing an Excel file as your database. Now, if you click on Test Connection, you get an error message saying the connection failed because the file is in an unrecognized format.

        But wait, there's hope! Acknowledge the error message and return to the General tab of the property pages. In the Connection String textbox, add this code to the end of the connection string:

Extended Properties = Excel 8.0;

Your full connection string now looks like this:

Provider=Microsoft.Jet.OLEDB.4.0; Data Source = FileName; Extended Properties=Excel 8.0;

Now if you click on the Build button, then click on the Test Connection button, the connection is successful.

-Michael J. McElwee, Highland Park, Illinois

MarlboroMan
mailto:gtryonp@afphorizonte.com.pe


Jimmy J. Yapo Maron
Banco Latino - GPI Sistemas
Jyapo@bcolatino.com.pe



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com