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. 4 3787
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\dbffile s\test.dbf):
Dim xlapp As New Excel.Applicati on
Dim xlbook As Excel.Workbook
Dim csvfilename As String
If ftype = "csv" Then
xlbook.SaveAs(c svfilename, xlCSV) ' csv
Else
xlbook.SaveAs(c svfilename, xlExcel7) ' xls 7
End If
xlapp.DisplayAl erts = False
xlbook.Close()
xlapp.DisplayAl erts = True
xlapp.Quit()
Marshal.Release ComObject(xlapp ) ' this is necessary to release a com object
xlbook = Nothing
xlapp = Nothing
HTH,
Bernie Yaeger
"A frustrated developer" <A frustrated de*******@discu ssions.microsof t.com>
wrote in message news:34******** *************** ***********@mic rosoft.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.
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.
"A frustrated developer" <A frustrated de*******@discu ssions.microsof t.com>
wrote in message news:34******** *************** ***********@mic rosoft.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
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*******@discu ssions.microsof t.com> wrote in message news:34******** *************** ***********@mic rosoft.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 program, I try to exit from Excel
using the followings statements.
m_objBook.Close(false, m_objOpt, m_objOpt);
m_objExcel.Quit();
|
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 solve with
this sentence:
System.Runtime.InteropServices.Marshal.ReleaseComObject(o);
|
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 (as EXCEL). So the
memory has been taken by excel objects and memory is being full. i want to
delete or kill this objects which are in memory. i wrote the code as
'myexcel.quit()' , myexcel=nothing. but still it is in memory.
pls tell me how to...
|
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 in the memory. So, I would like to kill an
"Excel" process and for it I need to know a ProcessID or something like
this. Who knows how can I get a processID or release COM objects?
Excel.ApplicationClass a = new Excel.ApplicationClass();
|
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 happening
it will create one process but , it wont close . i used the code from the
link below:
| |
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 elevated security to the proxy used for
anonymous access. Is there a way to either establish a temporary
security context, programmatically for the .NET Framework Process.Kill
to operate under? Or perhaps a way to give the compiled binary produced...
|
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 the data), it does the
same with all excel files.
I've found that it creates a process called Excel, when I end it (Windows
Task Manager) the problem is resolved.
I think that I need somewhere to kill the process..(I use oExcel.Quit() but
|
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 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...
|
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 = new string;
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |