-
Notifications
You must be signed in to change notification settings - Fork 0
4. Development
Mohamad EL-Bawab edited this page Aug 30, 2014
·
22 revisions
To setup your development folders, we recommend the following structure:
Where:
- numxl-sdk-vba folder contains all source files for the VBA SDK Wrapper (i.e. NumXLAPI.xla)
- output folder contains the executable binaries in NumXL and the SDK.
- proj folder is where you maintain the source code for your custom application.
Open Microsoft Excel Application, and save the new spreadsheet to disk as macro-enabled workbook in the installation directory.
Before we can start using the APIs, classes and the different types defined in the SDK, we need to add a reference to the SDK wrapper for VBA (aka NumXLAPI.xla).
- In Excel 2007 and later, enable the Developer tab (options --> Customize Ribbon).
- Locate and open the visual basic editor.
- From the Tools menu, click on the "References" item
- The Reference box pops up:
- Click on the "Browse" button and navigate to the SDK installation directory.
- Select NumXLAPI.xla. Click "OK" and the library is added to the references (i.e. checked).
- Click "OK" and examine your VBA project explorer. The NumXL SDK (i,e, NumXLAPI.xla) is added and a new folder entitled "References" is added.
Place an initialization and cleanup/shutdown source code in the workbook
In a user-module (e.g. Test), add a macro to query the machine ID text.
- For NumXL VBA SDK to find and to load the different DLLs, the DLLs must be located either in a folder in your windows path or in the current directory. The SFSDK module has a procedure (ChgCurrentDirectory) to change the current directory, so this sub must be called before calling any APIs.
- When you try to save your spreadsheet, Excel triggers a privacy warning message.



