File Exchange

image thumbnail

Excel Column Name to Number

version (1.37 KB) by Matt G
Converts a cell array of Excel column names to an array of Excel column numbers


Updated 03 Mar 2008

View License

XLSCOLSTR2NUM takes in a cellular array of characters and returns a array of numbers of the same size with elements corresponding to Excel column numbers.


Cite As

Matt G (2021). Excel Column Name to Number (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Andrew Stamps

Need to amend my previous comment. It works fine when using capital letters. An improvement would be to make it case insensitive.

Andrew Stamps

Fails for column names with more than two letters. Eg.

>> xlsColStr2Num({'zz'})
ans =
>> xlsColStr2Num({'aaa'})
ans =

MATLAB Release Compatibility
Created with R2006b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!