Main Content

MLUseCellArray

Toggle MLPutMatrix to use MATLAB cell arrays

Description

= MLUseCellArray(flag) specifies whether MLPutMatrix must use cell arrays for transfer of data (for example, dates). When the Spreadsheet Link™ software is installed, the default is "no". If you change the value of MLUseCellArray to "yes", the change remains in effect the next time a Microsoft® Excel® session starts. Use this syntax when working directly in a worksheet.

example

MLUseCellArray flag specifies whether MLPutMatrix must use cell arrays for transfer of data. Use this syntax in a VBA macro.

out = MLUseCellArray(flag) lets you catch errors when executing MLUseCellArray in a VBA macro. If MLUseCellArray fails, then out is a string containing error code. Otherwise, out is 0.

Examples

collapse all

Cancel automatic use of cell arrays for easy transfer of data:

MLUseCellArray("no")

Input Arguments

collapse all

Either "yes" or "no".

Specify "yes" to automatically use cell arrays for transfer of data structures. Specify "no" to stop using cell arrays for transfer of data structures.

Output Arguments

collapse all

0 if the command succeeded. Otherwise, a string containing error code.

Tips

  • 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.

Version History

Introduced in R2007a

See Also