xlsread function: How to only get certain info from Excel Spreadsheets?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Anne Nguyen
le 27 Oct 2019
Réponse apportée : Walter Roberson
le 27 Oct 2019
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 commentaires
Réponse acceptée
Walter Roberson
le 27 Oct 2019
>> 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!