Click to See Complete Forum and Search --> : Needed VB code to move data from excel sheet to Msaccess


sekharyala
01-27-2007, 02:40 PM
Hi,
I have a Small VBA problem.Can some one help me to move data in excel to msaccess with just a button click in excel sheet.

thechasboi
01-29-2007, 10:44 AM
sekharyala

You will most likely need to ADO.NET to do this.
using System;
using system.configuration;
usingsystem.data;
private oledbdataadapter da;
private datatable dt;
pribvate void excelform_load(object sender, system.eventargs e)
{
da = new oledataadapter("select * from [sheet1$]", configurationsettings.appsettings["excell
-0115_connection"]);


That is the start to the code. I suggest looking up ISAM information on the net. That is the most advanced features of .net and excell for office 2k and up. If you use ado.net you would need to install the latest version of .net onto your machine. I suggest installing the sdk on the development machine the the distributable version on the executing computer.