- Example: 'Sheet', 2
- Example: 'Sheet', 'MySheetName'
- Example: 'Sheet', "MySheetName"
Importing data from an Excel file with multiple tabs
조회 수: 59 (최근 30일)
이전 댓글 표시
I have an Excel file that I would like to pull data from, except it has multiple tabs and I have to use the command 'readtabe' to import the data because it is a mixture of different variable types. How can I specify which tab to pull data from?
댓글 수: 0
채택된 답변
Cris LaPierre
2023년 4월 14일
Use the 'Sheet' name-value pair to indicate which sheet to read the data from. Documented here: https://www.mathworks.com/help/matlab/ref/readtable.html#mw_0a3219fd-d40a-46a9-b230-7e249002f7b1
댓글 수: 0
추가 답변 (1개)
Walter Roberson
2023년 4월 14일
filename = 'AsAppropriate.xlsx';
T1 = readtable(filename, 'Sheet', 3); %can give sheet index
T2 = readtable(filename, 'Sheet', 'partslist'); %can give sheet name
댓글 수: 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!