How to read in Excel Default headers ?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello ,
I am trying to read data from excel using readtable
data = readtable('filename.xlsx');
Now if i want to read in deafult column name of excel (highlighted one)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/913155/image.png)
How may i acheive this ?
Thanks in advance
댓글 수: 1
Stephen23
2022년 3월 3일
편집: Stephen23
2022년 3월 3일
Those are not headers, those are the column labels or column references (analagous to indices in MATLAB):
The concept of "default" is not very meaningful as the column order is fixed and the labels cannot be changed (other than between A1 and R1C1 style references). Because they don't change I doubt that any Excel-processing app bothers to "import" them. As far as I can tell, they are not even stored explicitly in an XLSX file (references to individual cells or ranges certainly are, but I cannot find a list of column labels anywhere).
You can derive the column labels yourself from the column number, for example:
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!