Code covered by the BSD License  

Highlights from
Excel Column Conversion

4.33333

4.3 | 3 ratings Rate this file 31 Downloads (last 30 days) File Size: 1.93 KB File ID: #27182

Excel Column Conversion

by

 

07 Apr 2010 (Updated )

Converts between column name and number for Excel representation

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

ExcelCol Converts between column name and number for Excel representation
Out=ExcelCol(In) takes the input In, which may be a number, vector, char, or cell and converts it to the other representation
 
If IN is numeric, output will be a column cell of the column name
If IN is char or cell, output will be a number or column vector, ignoring any numberic part which may be included in input
 
EXAMPLES:
ExcelCol(100) %Number to column name
ExcelCol('CV') %Column name to number
ExcelCol([1 10 100 1000 16383]) %Multiple conversions
ExcelCol({'A' 'J' 'CV' 'ALL' 'XFC'}) %Multiple conversions

Acknowledgements

This file inspired Deer A2012.Zip, Column Converter For Excel, and Excel Column Conversion.

MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
07 Feb 2013 Benjamin  
13 Sep 2011 Image Analyst

Thanks. Works great. Just what I needed. I just had one Excel cell reference and the results came back as a MATLAB cell when what I needed was a string (character array), but I just passed the cell returned from ExcelCol into cell2mat() and I got my string like I needed.

16 Apr 2010 Petter

A range of numbers should return an Excel range as well.

Updates
04 Apr 2012

Rewrote help and summary

Contact us