Import current MATLAB figure into Microsoft Excel worksheet
If you use Microsoft®
Excel 2007 or 2010, MLGetFigure
scales the imported
figure by the product of width
and
height
along both dimensions.
If worksheet calculation mode is automatic, the software executes
MLGetFigure
when you enter the formula in a cell. If
worksheet calculation mode is manual, enter the MLGetFigure
function in a cell, then press F9
to execute it. Note that
pressing F9
can also execute other worksheet functions and
generate unpredictable results.
If you use MLGetFigure
in a macro subroutine, enter
MatlabRequest
on the line after
MLGetFigure
. The execution of
MatlabRequest
initializes internal Spreadsheet Link variables and enables MLGetFigure
to function
in a subroutine. Do not include MatlabRequest
in a macro
function unless the function is called from a subroutine.
To work with VBA code in Excel with Spreadsheet Link, you must enable Spreadsheet Link as a reference in the Microsoft Visual Basic Editor. For details, see Installation.