Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / February 2007

Tip: Looking for answers? Try searching our database.

Saving Excel file from VB.Net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter A - 21 Feb 2007 14:54 GMT
In a VB.Net program I am opening an Excel workbook, adding some data,
and then saving the file. My code is:

Dim xlApp As New Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet

' Code to add data here.

wb.Save()
xlApp.Quit()
xlApp = Nothing
       
The problem is that sometimes, but not all the time, the call to Save()
pops up a dialog box telling me that the file already exists and asking
if I want to replace it. THis is not supposed to happen with Save().
What could be causing this?

Signature

Peter Aitken

RobinS - 24 Feb 2007 01:43 GMT
> In a VB.Net program I am opening an Excel workbook, adding some data,
> and then saving the file. My code is:
[quoted text clipped - 13 lines]
> if I want to replace it. THis is not supposed to happen with Save().
> What could be causing this?

Well, apparently there is already a file with that name in that location.
Why do you think it's not supposed to happen with Save() ? It's just as if
you hit <Save> on the menu in Excel.

Robin S.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.