Solved

several different excel documents in one vb.net application

Posted on 2004-09-05
4
197 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
4 Comments
 
LVL 10

Accepted Solution

by:
123654789987 earned 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

896 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now