Add-In Setup
ConfigureMicrosoftExcel
To enable the Spreadsheet Link™ add-in, start a Microsoft®Excel®session and follow these steps.
If you useMicrosoft Excel2007:
Clickthe Microsoft Office button.
ClickExcel Options. The Excel Options dialog box opens.
If you useMicrosoft Excel2010 and later versions:
SelectFilefrom the main menu.
ClickOptions. The Excel Options dialog box opens.
The next steps are the same for both versions:
ClickAdd-Ins.
From theManageselection list, chooseExcel Add-Ins.
ClickGo. The Add-Ins dialog box opens.
ClickBrowse.
Select
matlabroot
\toolbox\exlink\excllink.xlam
. (matlabroot
returns the full path to the folder where MATLAB®is installed.)ClickOpen. In the Add-Ins dialog box, theSpreadsheet Link for use with MATLAB and Excelcheck box is selected.
ClickOKto close the Add-Ins dialog box.
ClickOKto close the Excel Options dialog box.
The Spreadsheet Link add-in loads now and with each subsequent Excel session.
TheMATLAB Command Windowbutton appears on the Microsoft Windows®taskbar.
The MATLAB group appears on the top right of theHometab in your Excel worksheet.
Spreadsheet Link is ready for use.
Right-click a cell to list the MATLAB options.
Note
If the options are missing from the context menu and if the Trust Center dialog box has theRequire Application Add-ins to be signed by Trusted Publishercheck box selected, then you must click theEnable Contentbutton for every session.
To check the settings in the Trust Center dialog box:
Click theDevelopertab.
In theCodegroup, click theMacro Securitybutton. The Trust Center dialog box opens.
Click插件.
Work withExcelMacros
To work with Excel macros, follow these steps to enable theDevelopertab on the Excel ribbon.
If you useMicrosoft Excel2007:
Clickthe Microsoft Office button.
ClickExcel Options. The Excel Options dialog box opens.
If you useMicrosoft Excel2010 and later versions:
Click theFilemenu.
ClickOptions. The Excel Options dialog box opens.
The next steps are the same for both versions:
ClickCustomize Ribbon.
From theMain Tabslist, selectDeveloperand clickOK. The Excel ribbon displays theDevelopertab.
In theCodesection of theDevelopertab, clickMacros. The Macro dialog box opens. Use this dialog box to run existing macros, create macros, and edit and delete macros.
Work withMicrosoftVisual BasicEditor
To enable Spreadsheet Link as a Reference in theMicrosoft Visual Basic®Editor:
Open a Visual Basic session. Click theVisual Basicbutton on theDeveloper选项卡,或按Alt+F11.
Note
For instructions about displaying theDevelopertab, see Excel Help.
In the Visual Basic toolbar, selectTools>References.
In the References — VBA Project dialog box, select theSpreadsheetLinkorSpreadsheetLink2007_2010check box.
ClickOK.