No description
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
【One-Line Pitch】
This is the official R2021b guide for turning MATLAB functions into Excel add-ins, covering everything from initial setup and packaging to end-user distribution and macro creation—essential reading for MATLAB developers who want to share their code with Excel users without requiring MATLAB on the target machine.
【Book Arc】
- **Opening (~0%–20%)**: Covers the legal boilerplate, revision history, and the core concept of how MATLAB Compiler bridges MATLAB code with Excel. It sets expectations by outlining the add-in's capabilities and limitations, plus the prerequisites (products, compilers, IDE) needed before you start.
- **Early (~20%–40%)**: Walks through the first hands-on steps: creating an Excel add-in directly from MATLAB, using the Library Compiler App, or via the `compiler.build.excelAddIn` command. It also covers packaging the application, testing it in Excel, and the initial distribution workflow, including COM component registration and macro security levels.
- **Middle (~40%–60%)**: Focuses on customizing the compiler project—tailoring the installer, managing required files, specifying which files ship with the app, and adjusting runtime settings. This section is about moving beyond a default build to a polished, deployable package.
- **Late (~60%–80%)**: Introduces the Function Wizard, a tool for executing MATLAB functions directly in Excel and creating macros. It covers two workflows: using functions already ready for deployment, and a more advanced path for prototyping and debugging new MATLAB functions before packaging them as an add-in.
- **Ending (~80%–100%)**: Delves into the underlying mechanics of MATLAB code deployment, explaining dependency analysis for both functions and data files, and how to exclude files from the package. This is the "how it works under the hood" chapter that helps troubleshoot deployment issues.
【Key Takeaways】
- **Excel add-ins are the bridge for non-MATLAB users** (Early): The entire premise is letting Excel users call MATLAB functions as if they were native Excel formulas or macros, removing the need for MATLAB on their machines. This is the core value proposition for sharing computational work.
- **Three paths to create an add-in** (Early): You can use the interactive Library Compiler App, the command-line function `compiler.build.excelAddIn`, or the Function Wizard. The choice depends on whether you prefer a GUI, scripted builds, or a workflow that also handles macro creation.
- **Distribution is a multi-step process, not a single file** (Early): End users need more than just the add-in; you must distribute the packaged application, register the COM component, and ensure Excel's macro security settings allow the add-in to run. Skipping these steps is a common cause of "it doesn't work" reports.
- **Customization is about controlling the user experience** (Middle): The compiler project settings let you manage the installer, bundle extra files (like data or documentation), and tweak runtime behavior. This is where you turn a bare function into a professional, self-contained application.
- **The Function Wizard is your interactive tool for Excel** (Late): It simplifies executing MATLAB functions and creating macros, and it supports two distinct workflows—one for already-compiled functions and another for prototyping and debugging new functions directly from the Excel environment.
- **Dependency analysis is automatic but needs your oversight** (Ending): MATLAB Compiler automatically figures out which functions and data files your code needs, but you can and should exclude files that aren't required. Understanding this analysis is key to keeping your package lean and avoiding runtime errors from missing dependencies.
【Reading Tips】
- **Skim the opening chapters** (~0–20%) if you're already familiar with MATLAB Compiler basics; the legal and revision history sections are not actionable. Focus instead on the "Prerequisites" and "Limitations" lists to confirm your setup is valid.
- **Deep-read the "Create Excel Add-In" chapter** (Early, ~20–40%) if you're a first-time user. Follow the Library Compiler App steps in order; this is the most common and forgiving path. Pay special attention to the "Files To Distribute" and "Registration" sections—they're the most likely source of deployment failures.
- **Treat the Function Wizard chapter** (Late, ~60–80%) as a reference, not a cover-to-cover read. If you only need to deploy existing functions, focus on the "Workflow Selection for MATLAB Functions Ready for Deployment." If you're building new functions, the "Prototyping and Debugging" workflow is your guide.
- **Use the final chapter** (Ending, ~80–100%) for troubleshooting. When a deployed add-in fails, return to the dependency analysis section to check whether a required file was excluded or a data file wasn't detected.
- **Skip the customization chapter** (Middle, ~40–60%) on a first pass unless you have specific installer or packaging requirements; it's valuable but not essential for a basic working add-in.
【Coverage Limits】
The excerpts are primarily a table of contents and chapter outlines; they do not include detailed step-by-step instructions, code examples, or troubleshooting scenarios. This guide synthesizes the book's structure and key concepts but cannot substitute for the full text when you need exact commands or UI walkthroughs.
Excerpt 1
书名: MATLAB Compiler Excel Add-In Users Guide (The MathWorks, Inc.) (Z-Library) MATLAB® Compiler™ MATLAB® Compiler™ Excel® Add-In User's Guide R2021b How to C...
View in text
Page 2
nk are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be...
View in text
Page 3
stallation . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 Macro Execution Security Levels in Microsoft Excel . . . . . . . . . . . . . . . . . 2-4 Dep...
View in text
Excerpt 4
. . . . . . . . . . . . . . . . . . . . . 2-15 iii Contents Customizing a Compiler Project 3 Customize an Application . . . . . . . . . . . . . . . . . . . ....
View in text
Page 4
. . . . . . . . . . . . . . . . . . . 4-13 Macro Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13 Microsoft...
View in text
Page 5
5 How Does MATLAB Deploy Functions? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2 Dependency Analysis Using MATLAB Compiler . . . . . . . . . ....
View in text
Tags
AI categories
TechnologyBackendProgramming
Text Preview (First 20 pages)
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Generating text preview…
Loading comments...
Reply to Comment
Edit Comment