OfficeDoc reads/writes/appends and formats data, images & figure screenshots in Microsoft Office documents, from within the Matlab environment. Supported formats include XLS (Excel), DOC (Word) & PPT (PowerPoint). Opening/closing COM server connection and files is user-controllable, enabling very fast sequential writes. Numerous format properties enable highly customizable output.
This function is meant as a direct replacement for Matlab's built-in xlsread/xlswrite functions. There is no comparable built-in Matlab support for DOC/PPT.
Due to the vast number of possible actions and properties, an extensive documentation facility was included: see the internal help or attached webpages.
A basic usage example follows. Please read the built-in documentation for more detailed examples:
>> [file,status] = officedoc(fileName, 'open', 'mode','append');
>> status = officedoc(file, 'write', 'title','My data',...
'data',[1,2;3,4], 'image',gcf, 'bold',1,'fgcolor','b');
>> status = officedoc(file, 'close');
Note: this submission is a free version of OfficeDoc. All the important OfficeDoc features are included in this free version - the professional version (available on http://www.ymasoftware.com) allows extra formatting options.
Bugs and suggestions:
OfficeDoc was tested on Office 11 (XP) & Matlab 6.0 (R12) - 7.4 (R2007a), but might also work on earlier versions of Matlab & Office. Please report any incompatibilities or other bugs/suggestions to Yair Altman (altmany at gmail dot com).
PC Windows (might work on Macs too). Microsoft Office (duh!)