필터 지우기
필터 지우기

xlsread function: How to only get certain info from Excel Spreadsheets?

조회 수: 3 (최근 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!

채택된 답변

Walter Roberson
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개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by