Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Email Server Source Code Pin
Anonymous8-Mar-04 1:52
Anonymous8-Mar-04 1:52 
GeneralRe: Email Server Source Code Pin
Iain Clarke, Warrior Programmer8-Mar-04 3:33
Iain Clarke, Warrior Programmer8-Mar-04 3:33 
GeneralCut, Copy and Paste Pin
Neha7-Mar-04 21:10
Neha7-Mar-04 21:10 
GeneralRe: Cut, Copy and Paste Pin
PJ Arends7-Mar-04 21:18
professionalPJ Arends7-Mar-04 21:18 
Question. Pin
hssaroch7-Mar-04 19:41
hssaroch7-Mar-04 19:41 
AnswerRe: how to use Toolbars in Win32 API Pin
Prakash Nadar7-Mar-04 20:57
Prakash Nadar7-Mar-04 20:57 
GeneralRe: how to use Toolbars in Win32 API Pin
Anonymous7-Mar-04 21:47
Anonymous7-Mar-04 21:47 
GeneralProblem to access the excel sheet with different versions(Excel 2000, Excel 2002) Pin
Member 7383647-Mar-04 19:26
Member 7383647-Mar-04 19:26 
Hi,
I have developed a small program to read the content from excel sheet in VC++. The developed program is working in Excel 2002 version, but it is not working in Excel 2000. I found that Excel 2002 having "_Application" class, but it is not in Excel 2000. In this project First I have included the "Excel.Exe" Type library. Then I changed the type library with "XL5EN32.OLB". Because this ".OLB" file is exist in both versions. Then I changed my code accordingly with the classes available in the OLB file. The classes I have included are "Application","WorkSheet","WorkSheets","WorkBook",WorkBooks","Range". While compilation time this project is ok. But it is giving the "Runtime" Error. Below I have mentioned the code I got the runtime error.

-----------------------

AfxOleInit(); //Initialization

Application app;
Workbook book;
Worksheet sheet;
Workbooks books;
Worksheets sheets;
Range range;
LPDISPATCH lpDisp;

COleVariant
covTrue((short)true),
covFalse((short)false),
covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);


if(!app.CreateDispatch("Excel.Application"))
{
AfxMessageBox("Unable to Create Excel Application");
return;
}

VARIANT var;
var=app.Workbooks(OleVariant("*.XLS")); //I got the RunTime error Here.
lpDisp = var.pdispVal;
books.AttachDispatch(lpDisp);

--------------------------------------------

var=app.Workbooks(OleVariant("*.XLS));

The above line is giving the problem. If anybody knows the solution to this problem, please reply me. Thank you very much.

Ramanan.

RamananS
GeneralRe: Problem to access the excel sheet with different versions(Excel 2000, Excel 2002) Pin
Steve S7-Mar-04 22:18
Steve S7-Mar-04 22:18 
Generalhtml generation Pin
vishalkohli7-Mar-04 19:11
vishalkohli7-Mar-04 19:11 
GeneralRe: html generation Pin
Prakash Nadar7-Mar-04 19:19
Prakash Nadar7-Mar-04 19:19 
GeneralRe: html generation Pin
George L. Jackson8-Mar-04 8:01
George L. Jackson8-Mar-04 8:01 
GeneralRe: html generation Pin
basementman8-Mar-04 13:13
basementman8-Mar-04 13:13 
GeneralGetFocus() returns NULL Pin
Swinefeaster7-Mar-04 18:58
Swinefeaster7-Mar-04 18:58 
GeneralRe: GetFocus() returns NULL Pin
Prakash Nadar7-Mar-04 19:07
Prakash Nadar7-Mar-04 19:07 
Generaldirectx 8 / 9 issues Pin
siniani7-Mar-04 16:24
siniani7-Mar-04 16:24 
GeneralThread programming question Pin
Madmaximus7-Mar-04 15:41
Madmaximus7-Mar-04 15:41 
GeneralRe: Thread programming question Pin
Prakash Nadar7-Mar-04 15:48
Prakash Nadar7-Mar-04 15:48 
GeneralRe: Thread programming question Pin
Madmaximus7-Mar-04 16:19
Madmaximus7-Mar-04 16:19 
GeneralRe: Thread programming question Pin
Prakash Nadar7-Mar-04 16:38
Prakash Nadar7-Mar-04 16:38 
GeneralRe: Thread programming question Pin
Curi0us_George7-Mar-04 16:43
Curi0us_George7-Mar-04 16:43 
Generalhot to set the step value in spin Pin
Mughi7-Mar-04 15:26
Mughi7-Mar-04 15:26 
GeneralRe: hot to set the step value in spin Pin
Prakash Nadar8-Mar-04 1:10
Prakash Nadar8-Mar-04 1:10 
GeneralRe: hot to set the step value in spin Pin
David Crow8-Mar-04 4:47
David Crow8-Mar-04 4:47 
GeneralRe: hot to set the step value in spin Pin
Roger Wright8-Mar-04 9:21
professionalRoger Wright8-Mar-04 9:21 

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.