3.71429

3.7 | 8 ratings Rate this file 121 Downloads (last 30 days) File Size: 126.57 KB File ID: #15192
image thumbnail

OfficeDoc - read/write/format MS Office docs (XLS/DOC/PPT)

by Yair Altman

 

04 Jun 2007 (Updated 05 Jun 2007)

Read/write/append/format/display data, images & screenshots in MS Office documents (XLS/DOC/PPT)

| Watch this File

File Information
Description

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

Requirements:
PC Windows (might work on Macs too). Microsoft Office (duh!)

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
saveppt, save2word, xlswrite1

MATLAB release MATLAB 6.0 (R12)
Other requirements Matlab 6+; Windows PC; MS Office
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (11)
05 Jun 2007 Amir Ibrahim

Works nicely, and very useful.

Very handy to easily format excel sheets generated from within matlab.

25 Jun 2007 DoubleW Jay

I doubt it it will work on a mac since the OfficeDoc uses ActiveX.

18 Jul 2007 Stephane ARMAND

Not open source!!!!

19 Jul 2007 ifeanyi philip

we need the formting leasonson mms word office

04 Sep 2007 murali mohan

The information given by u is very useful

12 Apr 2008 Gene Harding

Very helpful for creating MS Word documents.

23 Jul 2009 Anthony T  
27 Nov 2009 Asbjorn Klomp

Seems to very nice software but I have to agree with Stephane, it is not open source. With the demo version you do not get the same functionality as xlswrite (the option to adress the fields where one wants to write data to is not included)

27 Nov 2009 Asbjorn Klomp  
19 Sep 2010 Prashant Patil

even the example included needs professional version

11 Nov 2010 Riasat Abir

I want to write characters to a doc file using unicode value with a specific font of my mother tongue.
How to do it?
need help please, thanks in advance..

Please login to add a comment or rating.
Updates
05 Jun 2007

updated documentation

05 Jun 2007

Fixed "obsolete file" warning

Tag Activity for this File
Tag Applied By Date/Time
data import Yair Altman 22 Oct 2008 09:14:26
data export Yair Altman 22 Oct 2008 09:14:26
office xls ppt doc com powerpoint excel word Yair Altman 22 Oct 2008 09:14:26
office xls ppt doc com powerpoint excel word Anna P 07 May 2009 08:14:52
office doc Rodrigo Carvallo 14 Sep 2009 17:07:23
data export Bram 19 Sep 2011 10:23:01

Contact us at files@mathworks.com