Click here to Skip to main content
15,907,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: double = (int/int)*(int/int) Pin
Cedric Moonen30-May-07 4:04
Cedric Moonen30-May-07 4:04 
GeneralRe: double = (int/int)*(int/int) Pin
Immunity1830-May-07 4:05
Immunity1830-May-07 4:05 
GeneralRe: double = (int/int)*(int/int) Pin
Immunity1830-May-07 4:15
Immunity1830-May-07 4:15 
GeneralRe: double = (int/int)*(int/int) Pin
toxcct30-May-07 5:02
toxcct30-May-07 5:02 
GeneralRe: double = (int/int)*(int/int) Pin
CPallini30-May-07 4:24
mveCPallini30-May-07 4:24 
AnswerRe: double = (int/int)*(int/int) Pin
CPallini30-May-07 4:21
mveCPallini30-May-07 4:21 
GeneralRe: double = (int/int)*(int/int) Pin
Immunity1830-May-07 4:23
Immunity1830-May-07 4:23 
QuestionProblem with Excel automation Pin
Lampengeist30-May-07 3:38
professionalLampengeist30-May-07 3:38 
Hi there,

i have a problem with excel automation. I am using excel 2007 and Visual Studio 2005 with a dialog based MFC app. My code runs fine under excel 2000 but now i can't export any value to excel. Here now a code snippet of what i am doing:

pXL.CreateInstance(L"Excel.Application.12");
pXL->Visible[0] = VARIANT_TRUE;
WorkbooksPtr pBooks = pXL->Workbooks;
pBook = pBooks->Add((long)xlWorksheet);
pSheet = pXL->ActiveSheet;
pSheet->Name = "testname";
pSheet->Range["A1"]->Value = "1234";

this works fine to the pSheet->Range line. Excel opens, a new sheet is opened and this sheet is renamed to testname. But if i would write 1234 in the A1 excel cell a unhandled exception occurs and when i debug this the IDE jumps to the excel.tli file and displays this line:

#pragma implementation_key(1001)
inline void Excel::Range::PutValue ( const _variant_t & RangeValueDataType, const _variant_t & _arg2 ) {
_com_dispatch_method(this, 0x6, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL,
L"\x000c\x080c", &RangeValueDataType, &_arg2);
}

Now i don't now what to do, in the RangeValueDataType is the value i would write to the A1 cell and in _arg2 is a VT_ERROR value. I have searched the web and google groups, all people there using this pSheet->Range function and they don't have any problems with it. Anybody out there an idea whats going wrong there?

TIA and best regards,
Frank
QuestionRe: Problem with Excel automation Pin
David Crow30-May-07 3:49
David Crow30-May-07 3:49 
AnswerRe: Problem with Excel automation Pin
Lampengeist30-May-07 3:58
professionalLampengeist30-May-07 3:58 
QuestionRe: Problem with Excel automation Pin
David Crow30-May-07 3:58
David Crow30-May-07 3:58 
AnswerRe: Problem with Excel automation Pin
Lampengeist30-May-07 4:08
professionalLampengeist30-May-07 4:08 
GeneralRe: Problem with Excel automation Pin
David Crow31-May-07 4:46
David Crow31-May-07 4:46 
QuestionNetwork Deployment Pin
priyank_ldce30-May-07 3:00
priyank_ldce30-May-07 3:00 
NewsRe: Network Deployment Pin
Rajkumar R31-May-07 2:14
Rajkumar R31-May-07 2:14 
QuestionDirectshow Pin
kcynic30-May-07 2:33
kcynic30-May-07 2:33 
AnswerRe: Directshow Pin
#realJSOP30-May-07 3:28
professional#realJSOP30-May-07 3:28 
AnswerRe: Directshow Pin
Mark Salsbery30-May-07 4:33
Mark Salsbery30-May-07 4:33 
GeneralRe: Directshow Pin
#realJSOP30-May-07 6:08
professional#realJSOP30-May-07 6:08 
GeneralRe: Directshow [modified] Pin
Mark Salsbery30-May-07 6:16
Mark Salsbery30-May-07 6:16 
GeneralRe: Directshow Pin
kcynic30-May-07 6:52
kcynic30-May-07 6:52 
Questionhow to use c# dll in vc++ .net ? Pin
jalsa G30-May-07 2:31
jalsa G30-May-07 2:31 
QuestionRe: how to use c# dll in vc++ .net ? Pin
Hamid_RT30-May-07 2:42
Hamid_RT30-May-07 2:42 
AnswerRe: how to use c# dll in vc++ .net ? Pin
jalsa G30-May-07 3:02
jalsa G30-May-07 3:02 
GeneralRe: how to use c# dll in vc++ .net ? Pin
Hamid_RT30-May-07 8:52
Hamid_RT30-May-07 8:52 

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.