File Exchange

image thumbnail

Excel Column Name to Number

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

9 Downloads

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.

See Also XLSCOLNUM2STR

Cite As

Matt G (2021). Excel Column Name to Number (https://www.mathworks.com/matlabcentral/fileexchange/15806-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 =
1566
>> xlsColStr2Num({'aaa'})
ans =
23199

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!