473,506 Members | 17,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

vb.net code needed to import an Excel spreadsheet

1 New Member
i have the following code in my program:

Dim cn As System.Data.OleDb.OleDbConnection
Dim cmd As System.Data.OleDb.OleDbDataAdapter
Dim ds As New System.Data.DataSet()

cn = New System.Data.OleDb.OleDbConnection & _ ("provider=Microsoft.Jet.OLEDB.4.0;" & _
"data source=C:\Program files\Microsoft Visual Studio\MSDN98\98VS\1033\Samples\" & _
"HomeBudg.XLS;Extended Properties=Excel 8.0;")

' Select the data from Sheet1 of the workbook.
cmd = New System.Data.OleDb.OleDbDataAdapter("select * from [HomeBudg$]", cn)

cn.Open()
cmd.Fill(xds)
cn.Close()

I get an error saying file not found and its looking for an Excel .dll file which is on my system

Does anybody know how to do this ??????
Aug 23 '08 #1
1 1314
Dököll
2,364 Recognized Expert Top Contributor
Hey there!

Let's try over at .NET forum for added support, do come back here if VB 6.0 is what you needed:-)

Later!
Aug 24 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
31041
by: Johnny | last post by:
I was looking for information on how to import an excel file or other text file into a MySql database. I have done this with both access and SQL Server and am looking for a way to do this in...
3
3653
by: Elaksomfan | last post by:
Hi, I am having trouble importing data from an excel spreadsheet into MS SQL Server 2000 using DTS Wizard. The DTS import process is successfull, no errors, but only 50 rows of approx. 1500 rows...
1
1297
by: chris huff via .NET 247 | last post by:
I have a primary user who does NOT have ms Excel. He runs MSWorks and uses the spreadsheet program within it. My vb.net application is focused around a price sheet that theuser updates via their...
5
3778
by: Uma Muthu | last post by:
Hi, I have an ASP.NET (2.0) webform. I want to import an excel spreadsheet. In that Excel spreadsheet are specific cells that I want to capture specific data from. Is it doable? Thanks, ...
1
5715
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
0
3224
by: ssrirao | last post by:
There is an Excel Spreadsheet containing data, residing in an internet site. It’s very easy to Import data from a local Excel Spreadsheet into SQL Server Database Table using DTS. But in my case...
2
1370
by: gokulin | last post by:
Hi All, I am writing an ASP.NET application in C# (an Application integrated and communicates with MS CRM) with Excel Export and Import options. The user of the system exports data from the...
1
2981
by: Haidee | last post by:
Hi I'm pretty new to MS Access so please be patient.... I have a user that is trying to import an external excel spreadsheet into MS access 2003 by using the File - Get external data - Import. ...
4
2027
by: ALaurie10 | last post by:
I am somewhat familar with access, but have no clue to modules and coding. I am trying to develop code or a module that will enable a user to import a specific excel spreadsheet and its' data into a...
2
2991
by: BlackEyedPea | last post by:
Hi I have no coding experience but am using access 2003 on XP in the hope that I can find some code that will.... Search a folder in my network & import any excel spreadsheets it finds within...
0
7220
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1534
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.