Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
At the risk of asking a stupid question, what do you expect that line to do?

I'm assuming that you have a simple typo, and it should be COleVariant("*.XLS"), but that nicety aside, I think you need to understand what the method you're calling actually does.

app.Workbooks( VARIANT ) will return a Workbook object (strictly, a Workbook interface), and the value of the variant can be a numeric index into the collection, between zero and Workbooks.Count-1. It's a shorthand for app.Workbooks.Item(VARIANT). The value of the variant can also be a document name, such as "C:\Documents And Settings\Steve S\My Documents\vacation.xls".

There isn't, unless they've updated the model significantly since I last checked, anything that supports it being a wildcard.

I know all the automation stuff for Excel, Word etc has samples in VB, but I suggest you read the appropriate docs. It's not that hard to figure out. You might also search the MS site for a download called something like B2CSE. This is a simple VB automation to C++ automation conversion tool, and while it's not perfect, is really helpful in circumstances like this.

Steve S
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 
GeneralRe: hot to set the step value in spin Pin
David Crow8-Mar-04 9:28
David Crow8-Mar-04 9: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.