Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

several different excel documents in one vb.net application

Posted on 2004-09-05
4
Medium Priority
?
246 Views
Last Modified: 2010-04-23
I have (5) different excel documents that can be openned by one vb.net program.  The problem is not in the actually working of hte program but in that excel doesn't open up right.  I think that the problem resides in the fact that when the program starts I have 5 seperate excel.exe files running, one for each event and subsequent spread sheet.  I can still perform a saveas on the excel file that was openned and this still works, however you just can't see the form all you see is the top part of the excel document.  I can still perform a saveas on the document and when my program is closed the excel document opens fine.  I guess what I need is a way to make the excel.exe files start and stop only when commanded by my program.  I'm not sure if this is possible but if there is an answer I will find it here.

Thanks!!!!
0
Comment
Question by:signu1226
2 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 1000 total points
ID: 11987126
Even I had a faced a problem like this when I was coding for Excel Upload and Download functionality. It is not a good practise to open so many excel sheets at once. This will slow dowm the performance. If u want to read some data from these excel files or write to these excel files u can do them programitically. Why do u have to  open these files.

If u are writing to a particular Excel file u cannot open it as it is locked by your application. Try to avoid this.

U can dispose a Excel object programatically like this

 objWorksheet = Nothing
            objWorkBook = Nothing
            objExcel.Quit()
            objExcel = Nothing
            GC.Collect()
0
 
LVL 4

Expert Comment

by:Javert93
ID: 12008927
I may be able to help; could you post some code showing how you open the spreadsheets currently?
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question