Function File: mat2xls (obj,filename)

Save obj as an Excel sheet into the file filename. The object obj must be either a cell matrix or a real matrix, that is a 2-dimensional object. All elements of the matrix are converted to Excel cells and put into the first worksheet, starting at cell A1. Supported types are real values and strings.

If filename does not contain any directory, the file is saved in the current directory.

This function is intended to demonstrate the use of the COM interface within octave. You need Excel installed on your computer to make this function work properly.

Examples:

  mat2xls (rand (10, 10), 'test1.xls');
  mat2xls ({'This', 'is', 'a', 'string'}, 'test2.xls');

Package: windows