Click here to Skip to main content
15,906,455 members
Home / Discussions / C#
   

C#

 
QuestionOpen new tab that not exist Pin
tamir9017-Aug-09 1:43
tamir9017-Aug-09 1:43 
AnswerRe: Open new tab that not exist Pin
Arindam Sinha7-Aug-09 1:58
Arindam Sinha7-Aug-09 1:58 
GeneralRe: Open new tab that not exist Pin
tamir9017-Aug-09 2:04
tamir9017-Aug-09 2:04 
GeneralRe: Open new tab that not exist Pin
Arindam Sinha7-Aug-09 3:20
Arindam Sinha7-Aug-09 3:20 
AnswerRe: Open new tab that not exist Pin
Moreno Airoldi7-Aug-09 2:13
Moreno Airoldi7-Aug-09 2:13 
GeneralRe: Open new tab that not exist Pin
Luc Pattyn7-Aug-09 3:45
sitebuilderLuc Pattyn7-Aug-09 3:45 
GeneralRe: Open new tab that not exist Pin
Moreno Airoldi7-Aug-09 15:18
Moreno Airoldi7-Aug-09 15:18 
GeneralRe: Open new tab that not exist Pin
Luc Pattyn7-Aug-09 15:40
sitebuilderLuc Pattyn7-Aug-09 15:40 
GeneralRe: Open new tab that not exist Pin
tamir90112-Aug-09 5:08
tamir90112-Aug-09 5:08 
GeneralRe: Open new tab that not exist Pin
Moreno Airoldi12-Aug-09 6:56
Moreno Airoldi12-Aug-09 6:56 
GeneralRe: Open new tab that not exist Pin
tamir90112-Aug-09 18:54
tamir90112-Aug-09 18:54 
GeneralRe: Open new tab that not exist Pin
Moreno Airoldi13-Aug-09 0:31
Moreno Airoldi13-Aug-09 0:31 
QuestionProblem to Export DataTable to Excel. Pin
hdv2127-Aug-09 1:10
hdv2127-Aug-09 1:10 
AnswerRe: Problem to Export DataTable to Excel. Pin
Tamer Oz7-Aug-09 1:37
Tamer Oz7-Aug-09 1:37 
GeneralRe: Problem to Export DataTable to Excel. Pin
hdv2127-Aug-09 2:28
hdv2127-Aug-09 2:28 
Questionwhen is Excel shutdown completed? Pin
Harry6667-Aug-09 1:07
Harry6667-Aug-09 1:07 
AnswerRe: when is Excel shutdown completed? Pin
Moreno Airoldi7-Aug-09 2:03
Moreno Airoldi7-Aug-09 2:03 
QuestionRe: when is Excel shutdown completed? Pin
Harry6667-Aug-09 5:06
Harry6667-Aug-09 5:06 
AnswerRe: when is Excel shutdown completed? Pin
Moreno Airoldi7-Aug-09 15:12
Moreno Airoldi7-Aug-09 15:12 
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 
Okay, I thought about some things you said.

First thing:
My algorithm looks a little different...
I copy the master.xls to temp.xls
fiMyMaster.CopyTo(Path.Combine(destDir, "temp.xls"),true);
Then I don't call myWorkbook = myApp.Workbooks.Add(...)
I call myWorkbook = myApp.Workbooks.Open(...)

After I modified a lot of cells and ranges in all the sheets of this workbook
I simply do myWorkbook.Save(); // this is the temp.xls
and fiTemp.CopyTo(destfile);
where fiTemp obviously is the FileInfo to the temp.xls and destfile the designated full filename

Second thing:
Sure, I can call Process.Start after all that - works well! But I tried Process.Start(destfile) after the myWorkbook.Close part, before the myApp.Quit() and this doesn't work well. Frown | :(

Third:
I have to close the workbook and app, because it runs invisible. When I run Process.Start the user will see the opened ExcelApp Which he can stop by himself. So this is okay. I just have to check whether the designated file already is opened...

Greets
Harry

P.S.: the tool is paid Smile | :) All I do now (e.g. opening the xls files out of the tool) is my leisure time (perhaps this will also be paid Cool | :cool: Laugh | :laugh: )

no plan,
no signature

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 

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.