472,954 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

Reading MS EXCEL data into SQL SERVER

Hi,
In my windows application, I have created excel.application object
and read the excel data. I saved the data to sql server also.

The problem Iam facing is when I create an instance of
excel.application object, Microsoft excel process is being created and
it stays though I terminate the application.

I gave an input excel file, the problem has read the contents of that
file........

all this went well........... But the thing is EXCEL process being
created. When I see processes in the task manager I found so many EXCEL
processes with my user account.

Pls ............. anyway to solve this...............
I assigned the object to nothing also. still no
use......................

:-(

May 24 '06 #1
3 1580
An alternative woould be to use the Jet Engine to access the Excel file via
an OLEDBConnection.
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<Path and Filename>;Extended
Properties=Excel 8.0;

ETC...
--
Brad

"Software is like melted pudding..."
"Bharathi Kumar" wrote:
Hi,
In my windows application, I have created excel.application object
and read the excel data. I saved the data to sql server also.

The problem Iam facing is when I create an instance of
excel.application object, Microsoft excel process is being created and
it stays though I terminate the application.

I gave an input excel file, the problem has read the contents of that
file........

all this went well........... But the thing is EXCEL process being
created. When I see processes in the task manager I found so many EXCEL
processes with my user account.

Pls ............. anyway to solve this...............
I assigned the object to nothing also. still no
use......................

:-(

May 24 '06 #2

Make sure you .Close() the excel application.

Set any Excel object references to null.

You may want to call gc.
Bharathi Kumar wrote:
Hi,
In my windows application, I have created excel.application object
and read the excel data. I saved the data to sql server also.

The problem Iam facing is when I create an instance of
excel.application object, Microsoft excel process is being created and
it stays though I terminate the application.

I gave an input excel file, the problem has read the contents of that
file........

all this went well........... But the thing is EXCEL process being
created. When I see processes in the task manager I found so many EXCEL
processes with my user account.

Pls ............. anyway to solve this...............
I assigned the object to nothing also. still no
use......................

:-(

May 24 '06 #3
Thank you very much friends.

I caught the problem.

I should call workbookobject.Close() method.

I was searching the Close method for Excel.Application object.

In the code sample that I found in the net, I didnt remember whether
workbookobject.close() method is written or not.

I just followed the instructions there .....................

Thank you so much ................................

Warm regards
Bharathi Kumar.

May 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Derk | last post by:
I have an VB App that reads an Excel Sspreadsheet and it seems to having problems determining the data type of a column. The column in question has alpha numeric content eg S001, B123 or 1234. I am...
1
by: jinu | last post by:
hello, I need to run a vb.net application in different OSs like windows 2003, windows 2000, windows 98 etc.... where only windows 2003 have built-in .net framework and to be installed in...
0
by: Teddy | last post by:
Language: C Excel Reading Method: ExecuteReade I am currently running into a challenge reading excel data when datatype formats are different in the SAME column. It seems like datatype (in the...
12
by: DaveS | last post by:
Hi! Just a quick question... I need to import user data from an Excel spreadsheet. In VB6, I used strData = xlWksht.Range("$A$1) & "" to import a cell with string data in it. That...
6
by: simchajoy2000 | last post by:
Hi, So I do actually know how to read excel into VB.NET using the following approach: With oConn2 .ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & FilePath & ";Extended...
3
by: Shilpa | last post by:
Hi, I want to read excel data cell by cell using C#. I do not want to use a connection and say "select * from Sheet1" I do not want to use the COM Excel 11 library. I do not want to create an...
11
by: yaaara | last post by:
Hi, I am trying to import data from an excel file into my database. I am able to create an ado connection and then create a recordset of the excel data.. However, I am stuck at importing...
1
by: =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post by:
Hello All, I am trying to read an Excel spreadsheet (xls) programmatically. I have used the ODBC database route and have opened the Excel spreadsheet and then using a 'CRecordset', I read each...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.