View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Excel Column Conversion

4.6 | 5 ratings Rate this file 16 Downloads (last 30 days) File Size: 1.93 KB File ID: #27182 Version: 1.1

Excel Column Conversion


Mike Sheppard (view profile)


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

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


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 (5)
15 Dec 2015 Oscar

Oscar (view profile)

Awwww yeah, thank you very much! Nice work.

11 Aug 2015 PeterPantsless

07 Feb 2013 Benjamin

13 Sep 2011 Image Analyst

Image Analyst (view profile)

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

Petter (view profile)

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

04 Apr 2012 1.1

Rewrote help and summary

Contact us