473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Can not kill Excel object

The following article discussed how to use the Excel, close and kill it:

http://support.microsoft.com/default...b;en-us;317109

But if you added a oBook.SaveAs(...) to save the workbook in the code, it
never worked for me. We use Excel 2003 and Visual Studio 2003 under Windows
XP. We don't have problem to kill Excel instance under Windows 2000, feels
like it is a new problem come with XP. I have been searching google for days
and tried all kinds of solution, no luch so far. Please help!!! Thanks.
Jul 21 '05 #1
4 3753
Hi,

I looke at the article you reference and I don't see anything that it's
missing, but admittedly I just scanned it.

More importantly, the code below always works for me - on xp machines, no
problem (csvfilename is the full path to a .dbf file - eg,
f:\apps\dbffiles\test.dbf):

Dim xlapp As New Excel.Application

Dim xlbook As Excel.Workbook

Dim csvfilename As String

If ftype = "csv" Then

xlbook.SaveAs(csvfilename, xlCSV) ' csv

Else

xlbook.SaveAs(csvfilename, xlExcel7) ' xls 7

End If

xlapp.DisplayAlerts = False

xlbook.Close()

xlapp.DisplayAlerts = True

xlapp.Quit()

Marshal.ReleaseComObject(xlapp) ' this is necessary to release a com object

xlbook = Nothing

xlapp = Nothing

HTH,

Bernie Yaeger

"A frustrated developer" <A frustrated de*******@discussions.microsoft.com>
wrote in message news:34**********************************@microsof t.com...
The following article discussed how to use the Excel, close and kill it:

http://support.microsoft.com/default...b;en-us;317109

But if you added a oBook.SaveAs(...) to save the workbook in the code, it
never worked for me. We use Excel 2003 and Visual Studio 2003 under
Windows
XP. We don't have problem to kill Excel instance under Windows 2000, feels
like it is a new problem come with XP. I have been searching google for
days
and tried all kinds of solution, no luch so far. Please help!!! Thanks.

Jul 21 '05 #2
A frustrated developer wrote:
The following article discussed how to use the Excel, close and kill it:

http://support.microsoft.com/default...b;en-us;317109

But if you added a oBook.SaveAs(...) to save the workbook in the code, it
never worked for me. We use Excel 2003 and Visual Studio 2003 under Windows
XP. We don't have problem to kill Excel instance under Windows 2000, feels
like it is a new problem come with XP. I have been searching google for days
and tried all kinds of solution, no luch so far. Please help!!! Thanks.


A lot of things can affect this.

Are you trying to save an excel workbook from within
the same workbook? Are you modifying the code in the
workbook using the VBIDE Extensibility model?

Another thing that can affect this is if Excel tries
to pop up a dialog box on the save, such as to confirm
that information may be lost saving in the selected
format. You'll probably have to post again, giving a
-lot- more details, and a working sample of the code.

Do not reply via email; reply to the newsgroup.
Jul 21 '05 #3

"A frustrated developer" <A frustrated de*******@discussions.microsoft.com>
wrote in message news:34**********************************@microsof t.com...
The following article discussed how to use the Excel, close and kill it:

http://support.microsoft.com/default...b;en-us;317109

But if you added a oBook.SaveAs(...) to save the workbook in the code, it
never worked for me. We use Excel 2003 and Visual Studio 2003 under Windows XP. We don't have problem to kill Excel instance under Windows 2000, feels
like it is a new problem come with XP. I have been searching google for days and tried all kinds of solution, no luch so far. Please help!!! Thanks.


Do you have the Google desktop installed? If it's present, it prevents Excel
from shutting down.

/Fredrik
Jul 21 '05 #4
You are super. I do have Google desktop installed on my machine, after I
uninstalled it, it worked like a charm. Thanks for all the replys to help me
out -:)

"Fredrik Wahlgren" wrote:

"A frustrated developer" <A frustrated de*******@discussions.microsoft.com>
wrote in message news:34**********************************@microsof t.com...
The following article discussed how to use the Excel, close and kill it:

http://support.microsoft.com/default...b;en-us;317109

But if you added a oBook.SaveAs(...) to save the workbook in the code, it
never worked for me. We use Excel 2003 and Visual Studio 2003 under

Windows
XP. We don't have problem to kill Excel instance under Windows 2000, feels
like it is a new problem come with XP. I have been searching google for

days
and tried all kinds of solution, no luch so far. Please help!!! Thanks.


Do you have the Google desktop installed? If it's present, it prevents Excel
from shutting down.

/Fredrik

Jul 21 '05 #5

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

Similar topics

3
by: Joseph | last post by:
Hello, I am developing a program that will read data from a couple of text files, process it, and then, populate data into specific cells in an Excel spreadsheet. Towards the end of the...
5
by: Josema | last post by:
Hi to all, I have a windows application that uses workbooks, sheets, ranges, etc... This application is consumed by few clients. Some weeks ago I had problems to kill excel.exe process but i...
3
by: hari krishna | last post by:
hi, I am generating excel reports through vb.Net. After creating excel.application and the report is generated, each report leaves Excel in memory. I can see them in task manager in Process tab...
1
by: Michael Tkachev | last post by:
Hi Everybody, I created an Excel file in the ASP.Net. When I wrote this file on the disk I tryed to release COM objects. But I couldn't do it. When my method finished an "Excel" process exists...
2
by: charmis | last post by:
Hi everyone, I am trying to include one feature using excel object in my application. I am giving the code to create and kill the process , that i got from Microsoft site.......but nothing is...
1
by: Lee Gillie | last post by:
I need to be able to kill a process programmatically under ASP.NET. IIS runs under the local system account. The user accessing the web is using anonymous access. We would prefer NOT to grant...
2
by: touf | last post by:
Hi, I use the folowing code to create a new Excel file using a query It creates an excel file and save it on the disc, but When I double-clic on it (explorer) it open Excel and bloc,(don't display...
4
by: A frustrated developer | last post by:
The following article discussed how to use the Excel, close and kill it: http://support.microsoft.com/default.aspx?scid=kb;en-us;317109 But if you added a oBook.SaveAs(...) to save the workbook...
2
by: alexia.bee | last post by:
Hi All, I need to get all the IDs of specific process and kill all the instances of that process. Something like: // theArray get all the Excel proc IDs in the Task manager string theArray...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.