sheetnames
데이터저장소에서 시트 이름 쿼리
설명
예제
파일 airlinesmall_subset.xlsx를 포함하는 데이터저장소를 만듭니다.
ssds = spreadsheetDatastore('airlinesmall_subset.xlsx')
ssds =
SpreadsheetDatastore with properties:
Files: {
' ...\matlab\toolbox\matlab\demos\airlinesmall_subset.xlsx'
}
AlternateFileSystemRoots: {}
Sheets: ''
Range: ''
ReadFailureRule: 'error'
MaxFailures: Inf
Sheet Format Properties:
NumHeaderLines: 0
ReadVariableNames: true
VariableNames: {'Year', 'Month', 'DayofMonth' ... and 26 more}
VariableTypes: {'double', 'double', 'double' ... and 26 more}
Properties that control the table returned by preview, read, readall:
SelectedVariableNames: {'Year', 'Month', 'DayofMonth' ... and 26 more}
SelectedVariableTypes: {'double', 'double', 'double' ... and 26 more}
ReadSize: 'file'
데이터저장소에 포함된 첫 번째 파일(단 1개)의 시트 이름을 쿼리합니다.
sheetnames(ssds,1)
ans =
13×1 string array
"1996"
"1997"
"1998"
"1999"
"2000"
"2001"
"2002"
"2003"
"2004"
"2005"
"2006"
"2007"
"2008"
입력 인수
입력 데이터저장소로, SpreadsheetDatastore 객체로 지정됩니다. spreadsheetDatastore 함수나 datastore 함수를 사용하여 데이터에서 datastore 객체를 생성할 수 있습니다.
데이터저장소에 포함된 파일로, 쿼리할 파일의 이름을 포함하는 문자형 벡터 또는 string형 스칼라로 지정됩니다.
filename의 값은 데이터저장소의 Files 속성에 포함된 파일 이름과 정확하게 일치해야 합니다. 파일 이름이 정확하게 일치하는지 확인하려면 ssds.Files{N}을 사용하여 filename을 지정하십시오. 여기서 N은 Files 속성에 있는 파일의 인덱스입니다.
예: names = sheetnames(ssds,ssds.Files{1})은 데이터저장소 ssds의 Files 속성에 지정된 첫 번째 파일에 포함된 시트 이름을 반환합니다.
데이터형: char | string
파일 인덱스로, 양의 정수로 지정됩니다. I는 ssds에 포함된 파일 개수를 초과할 수 없습니다.
데이터형: double
출력 인수
시트 이름으로, 지정된 파일에 있는 시트 이름이 포함된 string형 배열로 반환됩니다.
데이터형: string
버전 내역
R2016a에 개발됨
참고 항목
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)