4.25

4.2 | 8 ratings Rate this file 106 downloads (last 30 days) File Size: 2.77 KB File ID: #4474

xlsheets

by Fahad Al Mahmood

 

12 Feb 2004 (Updated 01 Oct 2004)

Code covered by BSD License  

Creating sheets and naming them in Excel.

Download Now | Watch this File

File Information
Description

Creates new Excel file (or opens it if file exists) and name the sheets as listed in (sheetnames) and saves the workbook as (filename).

xlsheets(sheetnames,filename)
xlsheets(sheetnames)

sheetnames: List of sheet names (cell array).
filename: Name of excel file.

NOTE: Follow the following rules when naming your sheets:
1- Make sure the name you entered does not exceed 31 characters.
2- Make sure the name does not contain any of the following characters:
: \ / ? * [ or ]
3- Make sure you did not leave the name blank.
4- Make sure each sheet name is a character string.
5- Make sure you do not have two sheets or more with the same name.

Example:

sheetnames = {'Mama','Papa','Son','Daughter','Dog'};
filename = 'family.xls';
xlsheets(sheetnames,filename);
xlsheets(sheetnames);

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
xlswrite

MATLAB release MATLAB 6.5 (R13)
Other requirements Microsoft Excel
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
14 Feb 2004 Rashid Al mannai

Very useful program

29 Apr 2004 Udya Desai  
03 May 2004 Gourihar Kulkarni

An extraordinary .m file. I appreciate
your contribution to scientific community.
Many thanks.

30 Sep 2004 avi pinsker

Thak you very much, very usefull a program.
only one problem:
Invoke Error, Dispatch Exception: An attempt was made to load a program with an incorrect format
how do I fix this ?

17 Mar 2006 bean bean  
16 Apr 2007 Exo Sceleton

Thank you for your sharing mentality.
Just the lines of code i needed.

24 Sep 2008 Andrew Wilson

Works perfectly and solves a problem for me. The work is much appreciated.

09 Oct 2009 Tina Tseng  
Please login to add a comment or rating.
Updates
17 Feb 2004

Open exisiting file feature added

17 Feb 2004

Open exisiting file feature added

17 Feb 2004

Important Note Added to (help) in addition to more descriptive (in-program) documentation.

27 Feb 2004

Fixed [Group] problem + Making process invisible

01 Mar 2004

Fixed "replacing existing sheets" problem

16 Mar 2004

Fixed (filename) problem

05 Apr 2004

Fixed (Naming to an existing sheetnames + Opening Multiple Excel programs) Problems

17 May 2004

Added more help about the rules of naming Excel sheets

01 Oct 2004

Supporting Full or Partial Path

Tag Activity for this File
Tag Applied By Date/Time
data import Fahad Al Mahmood 22 Oct 2008 07:14:18
data export Fahad Al Mahmood 22 Oct 2008 07:14:18
excel Fahad Al Mahmood 22 Oct 2008 07:14:18
activex Fahad Al Mahmood 22 Oct 2008 07:14:18
spreadsheet Fahad Al Mahmood 22 Oct 2008 07:14:18
xls Fahad Al Mahmood 22 Oct 2008 07:14:18
utilities Fahad Al Mahmood 22 Oct 2008 07:14:18
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com