Click here to Skip to main content
15,891,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: when is Excel shutdown completed? Pin
Harry66610-Aug-09 23:29
Harry66610-Aug-09 23:29 
GeneralRe: when is Excel shutdown completed? Pin
Moreno Airoldi11-Aug-09 0:10
Moreno Airoldi11-Aug-09 0:10 
GeneralRe: when is Excel shutdown completed? Pin
Harry66611-Aug-09 3:20
Harry66611-Aug-09 3:20 
GeneralRe: when is Excel shutdown completed? Pin
Moreno Airoldi12-Aug-09 1:24
Moreno Airoldi12-Aug-09 1:24 
GeneralRe: when is Excel shutdown completed? Pin
Harry66612-Aug-09 2:09
Harry66612-Aug-09 2:09 
GeneralRe: when is Excel shutdown completed? Pin
Moreno Airoldi12-Aug-09 2:15
Moreno Airoldi12-Aug-09 2:15 
AnswerRe: when is Excel shutdown completed? Pin
Luc Pattyn7-Aug-09 5:31
sitebuilderLuc Pattyn7-Aug-09 5:31 
GeneralRe: when is Excel shutdown completed? Pin
Harry6668-Aug-09 1:38
Harry6668-Aug-09 1:38 
Hello Luc,
as I supposed it was just a matter of garbage collection.
I inserted the line
GC.Collect() and now it works fine.

Answering your suggestions:
1)I tell the workbook to SaveAs(...) then I Quit() the application. I want Excel to Quit when I finished writing the xls-documents, because someone (e.g. myself) might want to open the documents. And this is not possible as long as another task locks the documents. And Excel locks the documents as long as it is not shut down.

2)I'm starting one single Excel Application, with this I'm writing several workbooks (xls-files). When I wrote the file, I save and close it. Then I create the next file.
Actually, I copy an original to temp.xls (using only IO), then I write several stuff into this temp.xls, at the end I copy temp.xls to the final thisIsHowIWantToCallIt.xls (using IO)
An Excel Application may have more than one workbooks. the App.'s got a collection called workbooks. So opening a new would probably not abandon the old one.

3)There is no problem with the rights afaik. I create all the files by myself. They are just copies from the master. I'm using some makros in this Excel-sheets. If they were not allowed my programm would tell you to stop working and try playing solitaire Big Grin | :-D (just kidding)

Greets
Harry

no plan,
no signature

GeneralRe: when is Excel shutdown completed? Pin
Luc Pattyn8-Aug-09 1:47
sitebuilderLuc Pattyn8-Aug-09 1:47 
GeneralRe: when is Excel shutdown completed? Pin
Harry6668-Aug-09 2:22
Harry6668-Aug-09 2:22 
GeneralRe: when is Excel shutdown completed? Pin
Moreno Airoldi11-Aug-09 0:11
Moreno Airoldi11-Aug-09 0:11 
QuestionActive Crystal Report Pin
sharad Pyakurel7-Aug-09 0:45
sharad Pyakurel7-Aug-09 0:45 
QuestionCommunicating with another form... Pin
Baeltazor7-Aug-09 0:39
Baeltazor7-Aug-09 0:39 
AnswerRe: Communicating with another form... Pin
MarkB7777-Aug-09 0:44
MarkB7777-Aug-09 0:44 
QuestionCreating email reports with attached PDFs Pin
anderslundsgard7-Aug-09 0:35
anderslundsgard7-Aug-09 0:35 
AnswerRe: Creating email reports with attached PDFs Pin
Arindam Sinha7-Aug-09 2:06
Arindam Sinha7-Aug-09 2:06 
QuestionHow to create an application that lists folders containing the most disk space? Pin
Luke Perrin7-Aug-09 0:21
Luke Perrin7-Aug-09 0:21 
AnswerRe: How to create an application that lists folders containing the most disk space? Pin
MarkB7777-Aug-09 0:49
MarkB7777-Aug-09 0:49 
AnswerRe: How to create an application that lists folders containing the most disk space? Pin
Luc Pattyn7-Aug-09 1:11
sitebuilderLuc Pattyn7-Aug-09 1:11 
AnswerRe: How to create an application that lists folders containing the most disk space? Pin
Tamer Oz7-Aug-09 2:03
Tamer Oz7-Aug-09 2:03 
QuestionConvert pcl to PDF Pin
abbd6-Aug-09 23:19
abbd6-Aug-09 23:19 
AnswerRe: Convert pcl to PDF Pin
Manas Bhardwaj6-Aug-09 23:27
professionalManas Bhardwaj6-Aug-09 23:27 
Questionoutlook sync Pin
John_276-Aug-09 23:06
John_276-Aug-09 23:06 
QuestionBinaryFormatter.Deserialization SerializationException Pin
Trapper-Hell6-Aug-09 22:41
Trapper-Hell6-Aug-09 22:41 
AnswerRe: BinaryFormatter.Deserialization SerializationException Pin
Luc Pattyn7-Aug-09 0:27
sitebuilderLuc Pattyn7-Aug-09 0:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.