468,773 Members | 2,601 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,773 developers. It's quick & easy.

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 1428
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Teddy | last post: by
12 posts views Thread by DaveS | last post: by
6 posts views Thread by simchajoy2000 | last post: by
3 posts views Thread by Shilpa | last post: by
1 post views Thread by =?Utf-8?B?QWRyaWFuTW9ycmlz?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.