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.