Solved

several different excel documents in one vb.net application

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

707 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

17 Experts available now in Live!

Get 1:1 Help Now