Convert an A1-style spreadsheet column label to a number.

버전 1.12.0.0 (2.35 KB) 작성자: DS
ABC2NUM translates an A1-style (absolute) column label reference to a number; NUM2ABC does inverse.
다운로드 수: 1.7K
업데이트 날짜: 2012/3/23

라이선스 보기

ABC2NUM(S) returns the number corresponding to the spreadsheet column represented by the reference string, S. The input string, S, may contain the ascii letters A-Z, in the format commonly employed by spreadsheet programs such as Calc and Microsoft Excel[1]. Other characters, including lower case letters, a-z, are ignored.

NUM2ABC(D) returns the A1-style string label corresponding to the appropriate spreadsheet column represented by the specified integer, D. The specified integer must be greater than or equal to one.

references:
[1] Abraham, R., Burnett, M. and Erwig, M., "Spreadsheet Programming" Encyclopedia of Computer Science and Engineering, (ed. B.J. Wah), 2804-2810, 2009
DOI: 10.1002/9780470050118.ecse415

-----
Please note: There are many interesting submissions on FEX which provide similar results (see below).

#5942 - xlcolumn
#32843 - Excel column header
#30180 - Calculate Excel range
#28343 - Column Converter for Excel
#27182 - Excel Column Conversion
#15748 - Excel Column Number To Column Name
#12796 - excelcolumn
#6706 - Excel Named Ranges

인용 양식

DS (2024). Convert an A1-style spreadsheet column label to a number. (https://www.mathworks.com/matlabcentral/fileexchange/14008-convert-an-a1-style-spreadsheet-column-label-to-a-number), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.12.0.0

Edited info text; no code changes.

1.11.0.0

Edited info text; no code changes.

1.10.0.0

Edited info text; no code changes.

1.9.0.0

Added ref info.

1.3.0.0

.

1.2.0.0

Extended translation to cover arbitrary number of digits; included complementary function num2abc.

1.1.0.0

fixed string output

1.0.0.0

Fixed m-lint warnings.