Click here to Skip to main content
15,887,393 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Thread pool query Pin
Naveen21-Sep-09 4:04
Naveen21-Sep-09 4:04 
GeneralRe: Thread pool query Pin
Rajesh R Subramanian21-Sep-09 4:42
professionalRajesh R Subramanian21-Sep-09 4:42 
GeneralRe: Thread pool query Pin
Naveen21-Sep-09 7:10
Naveen21-Sep-09 7:10 
GeneralRe: Thread pool query Pin
Rajesh R Subramanian21-Sep-09 7:48
professionalRajesh R Subramanian21-Sep-09 7:48 
QuestionCell change event in Excel Pin
NarVish21-Sep-09 0:35
NarVish21-Sep-09 0:35 
AnswerRe: Cell change event in Excel Pin
Stuart Dootson21-Sep-09 2:35
professionalStuart Dootson21-Sep-09 2:35 
GeneralRe: Cell change event in Excel Pin
NarVish21-Sep-09 20:31
NarVish21-Sep-09 20:31 
GeneralRe: Cell change event in Excel Pin
NarVish23-Sep-09 23:26
NarVish23-Sep-09 23:26 
I've added the following code in SheetChange function, to retrieve the data entered in excel cells.
void _stdcall SheetChange(IDispatch *, struct Excel::Range *target)
{
_bstr_t result= target->GetAddress(1,1,Excel::XlReferenceStyle::xlR1C1,1,1);
string str=result;

std::cout << "str is: " << str << "\n";
int index1 = str.find("!R");
int index2 = str.find("C");

string rowIndex = str.substr(index1+2);
string colIndex = str.substr(index2+1);
rowIndex = str.substr(index1+2);
colIndex = str.substr(index2+1);

int rIndex = atoi(rowIndex.c_str());
int cIndex = atoi(colIndex.c_str());

Excel::RangePtr rangePtr = target->Worksheet->Cells;
_variant_t vItem = rangePtr->Item[rIndex][cIndex];
_bstr_t bstrText( vItem );

cout << bstrText;
}

bstrText contains data in excel cell. where as its not retrieving the automatic changes.
for example, C1 cell contains the function =SUM(A1,B1), A1 = 10, B1=20 then C1=30

if I changed value in A1 to 15, at a time there will changes in two cell, i.e, A1(15) and C1(35).
I'm able to get the A1 value but not C1. How can I trace C1 value (automatic changes).
Please guide me to solve this.
Thanks in advance.
GeneralRe: Cell change event in Excel Pin
Stuart Dootson24-Sep-09 5:57
professionalStuart Dootson24-Sep-09 5:57 
GeneralRe: Cell change event in Excel Pin
NarVish24-Sep-09 19:32
NarVish24-Sep-09 19:32 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson24-Sep-09 20:11
professionalStuart Dootson24-Sep-09 20:11 
GeneralRe: Cell change event in Excel Pin
NarVish24-Sep-09 21:26
NarVish24-Sep-09 21:26 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson25-Sep-09 4:03
professionalStuart Dootson25-Sep-09 4:03 
GeneralRe: Cell change event in Excel Pin
NarVish29-Sep-09 19:45
NarVish29-Sep-09 19:45 
GeneralRe: Cell change event in Excel Pin
NarVish30-Sep-09 18:29
NarVish30-Sep-09 18:29 
GeneralRe: Cell change event in Excel Pin
NarVish15-Oct-09 1:38
NarVish15-Oct-09 1:38 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson15-Oct-09 2:26
professionalStuart Dootson15-Oct-09 2:26 
GeneralRe: Cell change event in Excel Pin
NarVish15-Oct-09 2:43
NarVish15-Oct-09 2:43 
GeneralRe: Cell change event in Excel Pin
NarVish15-Oct-09 19:29
NarVish15-Oct-09 19:29 
GeneralRe: Cell change event in Excel Pin
NarVish18-Oct-09 22:13
NarVish18-Oct-09 22:13 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson19-Oct-09 0:25
professionalStuart Dootson19-Oct-09 0:25 
GeneralRe: Cell change event in Excel Pin
NarVish19-Oct-09 0:54
NarVish19-Oct-09 0:54 
GeneralRe: Cell change event in Excel Pin
Stuart Dootson19-Oct-09 1:09
professionalStuart Dootson19-Oct-09 1:09 
Questioninterfacing google earth with c++/MFC app Pin
brian scott21-Sep-09 0:20
brian scott21-Sep-09 0:20 
QuestionWriting unicode to file Pin
yeah100021-Sep-09 0:12
yeah100021-Sep-09 0:12 

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.