How to read the LAST sheet in excel
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi MATLAB experts,
I'd like to read the last sheet in excel spreadsheet. Although the sheet has a name, no matter what, I want to read the last sheet in the file.
Would you mind if I ask you to share your thoughts on this?
Thanks for your help. Jake
inputfolder = 'C:\Matlab\';
holdingfilename = [inputfolder,'prices.xls'];
sheet = 'random';
[numdata, txtdata] = xlsread(holdingfilename, sheet);
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2016년 8월 16일
편집: Azzi Abdelmalek
2016년 8월 16일
To get the name of the last sheet use xlsfinfo
[~,name]=xlsfinfo('file.xlsx')
last_sheet=name{end}
N=xlsread('file.xlsx',last_sheet)
추가 답변 (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!