Click here to Skip to main content
15,902,275 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Messages missing for slider controls (and also for spinbuttons etc.)? Pin
Atlantys30-Oct-03 13:17
Atlantys30-Oct-03 13:17 
Generalmysql with release mode? urgent Pin
murali_utr27-Oct-03 1:33
murali_utr27-Oct-03 1:33 
GeneralRe: mysql with release mode? urgent Pin
Steve S27-Oct-03 1:41
Steve S27-Oct-03 1:41 
GeneralThanks For Ur Help. Pin
murali_utr27-Oct-03 1:45
murali_utr27-Oct-03 1:45 
Generalregd radio buttons in VC++ Pin
karteek27-Oct-03 1:12
karteek27-Oct-03 1:12 
GeneralRe: regd radio buttons in VC++ Pin
Steve S27-Oct-03 1:39
Steve S27-Oct-03 1:39 
GeneralRe: regd radio buttons in VC++ Pin
Iain Clarke, Warrior Programmer27-Oct-03 1:40
Iain Clarke, Warrior Programmer27-Oct-03 1:40 
GeneralExcel-Automation with C++ Pin
DeckY27-Oct-03 0:58
DeckY27-Oct-03 0:58 
Hallo!
I have to export analysis-data from a MFC-application to an Excel-Sheet. I use Excel 2000 (Version 9) and have created several classes to make data-exchange within C++. To write the data into the sheet is not the problem, I´ve got the problem to send an Excel-formula from the application to the Excel-Sheet in several ranges. I tried to send a simple formula with the code below. The result ist that the string appears in the cells in Excel but isn´t executed automatically. I tried other ways, too but nothing happened or errors were given. Has someone experience in sending and executing formulas from MFC/C++ to an Excel-sheet? I would be very happy! Thank you.

VARIANT vVar;
long index[2];
DWORD numFields[2];
COleSafeArray saCell;
m_oBooks=m_oExcel.get_Workbooks();
m_oBook=m_oBooks.get_Item(COleVariant((short)1));
m_oSheets=m_oBook.get_Worksheets();
m_oSheet=m_oSheets.get_Item(COleVariant((short)1));
...
m_oRange=m_oSheet.get_Range(COleVariant("A3"),COleVariant("D3"));
m_oRange=m_oRange. get_Resize(COleVariant((short)1),COleVariant((shor
t)(4)));
numFields[0]=1;
numFields[1]=4;
saCell.Create(VT_BSTR,2,numFields);
index[0]=0;
index[1]=0;
vVar.vt=VT_BSTR;
csStr.Format("=WENN(A2=0;1;99)");
vVar.bstrVal=csStr.AllocSysString();
saCell.PutElement(index,vVar.bstrVal);
m_oRange.put_Formula(COleVariant(saCell));


GeneralCSocket and CWinThread Pin
y_seval27-Oct-03 0:55
y_seval27-Oct-03 0:55 
GeneralRe: CSocket and CWinThread Pin
vcplusplus27-Oct-03 1:50
vcplusplus27-Oct-03 1:50 
QuestionHow to change the font size and color of the fonts in a edit box Pin
Deepak Samuel27-Oct-03 0:00
Deepak Samuel27-Oct-03 0:00 
AnswerRe: How to change the font size and color of the fonts in a edit box Pin
Steve S27-Oct-03 1:37
Steve S27-Oct-03 1:37 
GeneralOutlook Automation (C++) Pin
chz171065xy26-Oct-03 23:20
chz171065xy26-Oct-03 23:20 
GeneralRe: Outlook Automation (C++) Pin
Heath Stewart27-Oct-03 3:24
protectorHeath Stewart27-Oct-03 3:24 
GeneralRe: Outlook Automation (C++) Pin
chz171065xy27-Oct-03 21:37
chz171065xy27-Oct-03 21:37 
GeneralRe: Outlook Automation (C++) Pin
David Crow28-Oct-03 4:08
David Crow28-Oct-03 4:08 
Generalurgent! Pin
ranjjj26-Oct-03 22:57
ranjjj26-Oct-03 22:57 
GeneralRe: urgent! Pin
David Crow27-Oct-03 2:46
David Crow27-Oct-03 2:46 
GeneralRe: urgent! Pin
ranjjj27-Oct-03 17:04
ranjjj27-Oct-03 17:04 
GeneralRe: urgent! Pin
David Crow28-Oct-03 2:45
David Crow28-Oct-03 2:45 
GeneralRe: urgent! Pin
ranjjj28-Oct-03 2:56
ranjjj28-Oct-03 2:56 
GeneralRe: urgent! Pin
David Crow28-Oct-03 3:09
David Crow28-Oct-03 3:09 
GeneralRe: urgent! Pin
ranjjj28-Oct-03 0:48
ranjjj28-Oct-03 0:48 
GeneralRe: urgent! Pin
David Crow28-Oct-03 3:02
David Crow28-Oct-03 3:02 
GeneralRe: urgent! Pin
ranjjj28-Oct-03 3:22
ranjjj28-Oct-03 3:22 

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.