Click here to Skip to main content
15,914,417 members
Home / Discussions / C#
   

C#

 
AnswerRe: Problem with Open(or save)Filedialog [modified] Pin
Luc Pattyn17-Jan-09 4:03
sitebuilderLuc Pattyn17-Jan-09 4:03 
GeneralRe: Problem with Open(or save)Filedialog Pin
spiritboy17-Jan-09 6:06
spiritboy17-Jan-09 6:06 
AnswerRe: Problem with Open(or save)Filedialog [modified] Pin
Luc Pattyn17-Jan-09 6:21
sitebuilderLuc Pattyn17-Jan-09 6:21 
GeneralRe: Problem with Open(or save)Filedialog Pin
spiritboy17-Jan-09 6:49
spiritboy17-Jan-09 6:49 
AnswerRe: Problem with Open(or save)Filedialog Pin
Luc Pattyn17-Jan-09 7:17
sitebuilderLuc Pattyn17-Jan-09 7:17 
QuestionSqlDataReader contents Pin
AmbitiousBeginner17-Jan-09 3:13
AmbitiousBeginner17-Jan-09 3:13 
AnswerRe: SqlDataReader contents Pin
Not Active17-Jan-09 3:20
mentorNot Active17-Jan-09 3:20 
QuestionSuppress the msg - xls is already open. Reopening will cause any changes you made to be discarded. Pin
KarthikonIT17-Jan-09 2:33
KarthikonIT17-Jan-09 2:33 
Hi,
I was trying to automate MSExcel using C#. I face a problem when I was trying to open a workbook for the second time, throwing up a message
"xls is already open. Reopening will cause any changes you made to be discarded." inspite of releasing the Workbook Object. Any help to suppress the message would be greatly appreciated.
Thanks in advance.


Code snippet used.


m_oWorkBook = m_oWorkBooks.Open(strFileName, m_objOpt, false, m_objOpt, m_objOpt, m_objOpt, m_objOpt , m_objOpt, m_objOpt, true, m_objOpt, m_objOpt, m_objOpt, m_objOpt, m_objOpt); //open a workbook

.... //Some operation.

GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();
GC.WaitForPendingFinalizers();
Marshal.FinalReleaseComObject(m_oWorkBook); // release the workbook


Other Excel COM Objects which are acquired are also released in the proper sequence.
AnswerRe: Suppress the msg - xls is already open. Reopening will cause any changes you made to be discarded. Pin
Abhijit Jana17-Jan-09 3:11
professionalAbhijit Jana17-Jan-09 3:11 
GeneralRe: Suppress the msg - xls is already open. Reopening will cause any changes you made to be discarded. Pin
KarthikonIT17-Jan-09 3:57
KarthikonIT17-Jan-09 3:57 
QuestionDetect Idle activity in a webpage Pin
Mazen El Cheikh17-Jan-09 1:15
Mazen El Cheikh17-Jan-09 1:15 
AnswerRe: Detect Idle activity in a webpage Pin
Christian Graus17-Jan-09 1:49
protectorChristian Graus17-Jan-09 1:49 
GeneralRe: Detect Idle activity in a webpage Pin
Mazen El Cheikh17-Jan-09 23:27
Mazen El Cheikh17-Jan-09 23:27 
Question[Message Deleted] Pin
lavankumar16-Jan-09 22:59
lavankumar16-Jan-09 22:59 
AnswerRe: how to break Dongle key from hardware device PinPopular
Garth J Lancaster16-Jan-09 23:24
professionalGarth J Lancaster16-Jan-09 23:24 
AnswerRe: how to break Dongle key from hardware device Pin
bachuwarmahendar17-Jan-09 0:39
bachuwarmahendar17-Jan-09 0:39 
JokeRe: how to break Dongle key from hardware device Pin
Abhijit Jana17-Jan-09 0:51
professionalAbhijit Jana17-Jan-09 0:51 
QuestionHow to fill Data to gridview on Textchange event of Textbox Pin
sanpune16-Jan-09 20:56
sanpune16-Jan-09 20:56 
AnswerRe: How to fill Data to gridview on Textchange event of Textbox Pin
Abhijit Jana16-Jan-09 21:42
professionalAbhijit Jana16-Jan-09 21:42 
QuestionHow to modify datasource of crystal report at runtime Pin
Ali 11016-Jan-09 20:42
Ali 11016-Jan-09 20:42 
AnswerCross-post Pin
Wendelius16-Jan-09 23:40
mentorWendelius16-Jan-09 23:40 
Questionturning a developed application to a software package [modified] Pin
AmbitiousBeginner16-Jan-09 20:13
AmbitiousBeginner16-Jan-09 20:13 
AnswerRe: turning a developed application to a software package Pin
Jon Rista16-Jan-09 20:21
Jon Rista16-Jan-09 20:21 
QuestionMerging Cells in datagridview.. Pin
Lijo Rajan16-Jan-09 18:54
Lijo Rajan16-Jan-09 18:54 
Questionset the cursor at the end of textbox Pin
dilip51416-Jan-09 18:43
dilip51416-Jan-09 18:43 

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.