Solved

several different excel documents in one vb.net application

Posted on 2004-09-05
4
208 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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