in black and white
Main menu
Share a book About us Home
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

Excel add in development in C++ Aplications in finance - Dalton S.

Dalton S. Excel add in development in C++ Aplications in finance - Wiley publishing , 2005. - 425 p.
ISBN 0-470-02469-0
Download (direct link): exceladdindevelopmentincand2005.pdf
Previous << 1 .. 89 90 91 92 93 94 < 95 > 96 97 98 99 100 101 .. 168 >> Next

ArgNum What the function returns
15 True if the workbook windows are protected.
24 True if changes were made to the workbook since last saved.
33 The title of the workbook as in the Summary Info dialog box.
34 The subject of the workbook as in the Summary Info dialog box.
35 The author of the workbook as in the Summary Info dialog box.
36 The keywords for the workbook as in the Summary Info dialog box.
37 The comment for the workbook as in the Summary Info dialog box.
38 The name of the active worksheet.
The Excel4() function set-up and call are as shown in the following C/C++ code example of an exportable function that wraps up the call to xlfGetWorkbook and returns whatever is returned from that call:
xloper * stdcall get_workbook(int arg_num, char *book_name)
xloper argl, arg2; static xloper ret_xloper;
if(arg_num < 1 || arg_num > 38) return p_xlErrValue;
argl.xltype = xltypeInt; argl.val.w = arg_num;
arg2.xltype = xltypeStr;
arg2.val.str = new_xlstring(book_name);
arg2.xltype = xltypeMissing;
Excel4(xlfGetWorkbook, &ret_xloper, 2, &arg1, &arg2);
// Tell Excel to free up memory that it might have allocated for // the return value.
ret_xloper.xltype |= xlbitXLFree;
return &ret_xloper;
Accessing Excel Functionality Using the C API
The following code is equivalent to the above, but uses the cpp_xloper class.
xloper * stdcall get_workbook(int arg_num, char *book_name)
cpp_xloper Arg1(arg_num, 1, 38);
if(!Arg1.IsType(xltypeInt)) return p_xlErrValue;
cpp_xloper Arg2(book_name); cpp_xloper RetVal;
Excel4(xlfGetWorkbook, &RetVal, 2, &Arg1, &Arg2); return RetVal.ExtractXloper(true);
8.9.11 Information about the workspace: xlfGetWorkspace
Overview: The function returns information about the workspace.
The argument corresponds to the information you are trying to get. The meaning of the most useful of these 72 values is given in Table 8.17.6
Enumeration value: 186 (xba)
Callable from: Commands and macro sheet functions.
Return type: Various, depending on the value of the first argument.
Arguments: ArgNum: A number from 1 to 72 inclusive.
Table 8.17 Selected argument to xlfGetWorkspace
ArgNum What the function returns
1 The current environment and version number, e.g., Windows (32-bit) NT 5.00.
2 The Excel version number as a string.
3 If fixed decimals are set, returns the number of decimals, otherwise 0.
4 True if in R1C1 mode.
5 True if scroll bars are displayed. See also xlfGetWindow with ArgNum = 26 and 27.
6 True if the status bar is displayed.
7 True if the formula bar is displayed.
(continued overleaf )
6 For values not covered, see the Macro Sheet Function Help included with the Excel SDK.
Excel Add-in Development in C/C++
Table 8.17 (continued)
ArgNum What the function returns
8 True if remote DDE requests are enabled.
9 The alternate menu key or #N/A if no alternate menu key is set.
10 The current mode that Excel is in: 0 = Normal 1 = Data Find 2 = Copy 3 = Cut 4 = Data Entry 5 = Unused 6 = Copy and Data Entry 7 = Cut and Data Entry
15 Maximised/minimised state of Excel: 1 = Neither 2 = Minimised 3 = Maximised
16 Kilobytes of free memoiy.
17 Kilobytes of total memory available to Excel.
20 If a group is present in the workspace, a horizontal array of sheets in the group, otherwise #N/A
21 True if the standard toolbar is displayed.
22 DDE application-specific error code.
23 Full path of the default start-up directory.
24 Full path of the alternate start-up directory, or #N/A if not specified.
25 True if set for relative reference macro recording.
26 Name of user.
27 Name of organisation.
32 The full path of the location of Microsoft Excel.
33 A horizontal array of the names in the Insert... list (accessed from the worksheet tab context menu) in the order they appear. (Note that not all of these are available from the File/New... list.)
34 A horizontal array containing template path and filenames corresponding to the array returned with ArgNum = 33. Returns #N/A for built-in document types.
Accessing Excel Functionality Using the C API
Table 8.17 (continued)
ArgNum What the function returns
36 True if the Allow Cell Drag And Drop check box is selected in the Edit tab of the Options dialog box.
37 A 45-item horizontal array of the items related to country versions and settings. (See next table for details.)
40 True if screen updating is enabled during macro execution.
41 A horizontal array of cell ranges, in R1C1 style, that were previously selected with the Goto command from the Edit menu or macro function equivalent.
44 A three-column array of all currently registered DLL procedures. (See section 8.5. Registering and un-registering DLL (XLL) functions for details of the meaning of the data returned in column 3.) Column 1: The full path and filename of the DLLs that contains the procedure. Column 2: The exported name of the DLL function (which may not be the same as the name as it appears in the worksheet). Column 3: String specifying the data type of the return value, the number and type of the arguments, whether volatile or a macro sheet function.
Previous << 1 .. 89 90 91 92 93 94 < 95 > 96 97 98 99 100 101 .. 168 >> Next