Click here to Skip to main content
15,889,391 members
Home / Discussions / C#
   

C#

 
GeneralRe: The ConnectionString property has not been initialized ! Pin
Nader Elshehabi22-Aug-06 3:47
Nader Elshehabi22-Aug-06 3:47 
GeneralRe: The ConnectionString property has not been initialized ! Pin
Steve :)22-Aug-06 12:42
Steve :)22-Aug-06 12:42 
AnswerRe: The ConnectionString property has not been initialized ! Pin
Coding C#21-Aug-06 20:26
Coding C#21-Aug-06 20:26 
QuestionmouseMove event Pin
jamsiro21-Aug-06 12:49
jamsiro21-Aug-06 12:49 
AnswerRe: mouseMove event Pin
Shy Agam21-Aug-06 13:06
Shy Agam21-Aug-06 13:06 
AnswerRe: mouseMove event Pin
Nader Elshehabi21-Aug-06 13:18
Nader Elshehabi21-Aug-06 13:18 
QuestionRepresent CSS in C# [modified] Pin
Goebel21-Aug-06 12:32
Goebel21-Aug-06 12:32 
QuestionError: "Call was rejected by callee" Pin
Goalie3521-Aug-06 11:49
Goalie3521-Aug-06 11:49 
Hi guys.

In my project, I'm opening an MS Excel file and then trying to update some of the cells within it. The only catch however is this particular excel file contains two additional pivottables as well which contain a macro that executes code the instant the excel file is opened.

So, due to the fact that I'm trying update cells at the same time this macro is trying to execute its code, I'm receiving an error which reads:
"Call was rejected by callee"

I've provided my code below. It fails on line 3 ("sheet = MSExcel..."):
----------------------------------------------------
workbook = excel.Workbooks.Open(filePath,0, false, 5, "", "", false, MSExcel.XlPlatform.xlWindows, "",true, false, 0, true, false, false);

sheet = (MSExcel.Sheets)workbook.Worksheets;
worksheet = (MSExcel._Worksheet)sheet.get_Item(currentSheet);
------------------------------------------------------

Apparently, Excel is single-threaded so it can't handle two things at once. I noticed this because while debugging, if I set a breakpoint on my line of code that opens excel and "step into" the next few lines of code, everything works fine (i.e. I gave the macro enough time to execute its code first).

So anyway, I was just wondering if anyone has ever come across this issue before and what can be done to correct it.

Thanks in advance.

-Goalie35
AnswerRe: Error: "Call was rejected by callee" Pin
bradsnobar21-Aug-06 12:13
bradsnobar21-Aug-06 12:13 
QuestionHow to paint embedded controls. Pin
bradsnobar21-Aug-06 11:48
bradsnobar21-Aug-06 11:48 
AnswerRe: How to paint embedded controls. Pin
Nader Elshehabi21-Aug-06 13:14
Nader Elshehabi21-Aug-06 13:14 
QuestionUsing reflection to call an internal method Pin
Ista21-Aug-06 11:33
Ista21-Aug-06 11:33 
AnswerRe: Using reflection to call an internal method Pin
Vitaliy Tsvayer21-Aug-06 11:58
Vitaliy Tsvayer21-Aug-06 11:58 
QuestionC# DataGrid Question Pin
kalyanPaladugu21-Aug-06 10:29
kalyanPaladugu21-Aug-06 10:29 
AnswerRe: C# DataGrid Question Pin
Nader Elshehabi21-Aug-06 11:03
Nader Elshehabi21-Aug-06 11:03 
AnswerRe: C# DataGrid Question [modified] Pin
Vitaliy Tsvayer21-Aug-06 11:52
Vitaliy Tsvayer21-Aug-06 11:52 
QuestionReference Debug/Release version dll's of external projects Pin
wrykyn21-Aug-06 9:45
wrykyn21-Aug-06 9:45 
AnswerRe: Reference Debug/Release version dll's of external projects Pin
Nader Elshehabi21-Aug-06 10:50
Nader Elshehabi21-Aug-06 10:50 
QuestionLooking for a good tutorial Pin
Soot21-Aug-06 9:44
Soot21-Aug-06 9:44 
AnswerRe: Looking for a good tutorial Pin
Nader Elshehabi21-Aug-06 10:42
Nader Elshehabi21-Aug-06 10:42 
Questiondataset sort and combine/consolidate Pin
jeweladdict21-Aug-06 8:52
jeweladdict21-Aug-06 8:52 
AnswerDatarow combining Pin
jeweladdict21-Aug-06 9:50
jeweladdict21-Aug-06 9:50 
AnswerRe: dataset sort and combine/consolidate Pin
Nader Elshehabi21-Aug-06 10:59
Nader Elshehabi21-Aug-06 10:59 
GeneralRe: dataset sort and combine/consolidate Pin
jeweladdict21-Aug-06 12:50
jeweladdict21-Aug-06 12:50 
GeneralRe: dataset sort and combine/consolidate Pin
Nader Elshehabi21-Aug-06 13:28
Nader Elshehabi21-Aug-06 13:28 

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.