xlsread function: How to only get certain info from Excel Spreadsheets?
6 次查看(过去 30 天)
显示 更早的评论
Hello, how do only get certain parts of an Excel Spreadsheet onto a MATLAB script? For example, I only want to include cells G2:W2 from the spreadsheet, (which is just a fake answer key for a multiple-choice part of a given quiz), so how do I do this? I know that I have to use the xlsread function. What I have so far is:
[num,txt,raw] = xlsread(quiz_results.xslx')
Thank you!
0 个评论
采纳的回答
Walter Roberson
2019-10-27
>> help xlsread
xlsread Read Microsoft Excel spreadsheet file.
[NUM,TXT,RAW]=xlsread(FILE) reads data from the first worksheet in the Microsoft
Excel spreadsheet file named FILE and returns the numeric data in array NUM.
Optionally, returns the text fields in cell array TXT, and the unprocessed data
(numbers and text) in cell array RAW.
[NUM,TXT,RAW]=xlsread(FILE,SHEET) reads the specified worksheet.
[NUM,TXT,RAW]=xlsread(FILE,SHEET,RANGE) reads from the specified SHEET and RANGE.
Specify RANGE using the syntax 'C1:C2', where C1 and C2 are opposing corners of
the region. Not supported for XLS files in BASIC mode.
0 个评论
更多回答(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!