How to read specific sheet from an excel file using readcell?

402 vues (au cours des 30 derniers jours)
Akshay Chandel
Akshay Chandel le 28 Sep 2021
Commenté : Simon Chan le 28 Sep 2021
I am unable to find the command which can read specific sheet from an excel file using readcell since is not recommending to use xlsread and xlswrite
  2 commentaires
Mathieu NOE
Mathieu NOE le 28 Sep 2021
hello
what have you tried so far ? have you tried with readtable ?
Akshay Chandel
Akshay Chandel le 28 Sep 2021
What I mean is xlsread has the command to read data of a specific sheet in xlsx file. Now matlab is recommending to use readmatrix, readtable or readcell to read xlsx file. Do we have that reading specific sheet feature in any of the three commands MATLAB is recommending.
In simple words I want to read data only from constant sheet but the three commands "readmatrix, readtable and readcell" are only reading first sheet that is signal here.

Connectez-vous pour commenter.

Réponse acceptée

Simon Chan
Simon Chan le 28 Sep 2021
Try the following for an excel file name 'demo.xlsx', and sheet name 'Signals'.
It is the same for readtable or readmatrix.
readcell('demo.xlsx','UseExcel',true,'Sheet','Signals')
  3 commentaires
Akshay Chandel
Akshay Chandel le 28 Sep 2021
Thank you Simon. Its working. How did you know this. I read the whole document but coudnt find it.
Simon Chan
Simon Chan le 28 Sep 2021
It is in the documentation.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Import and Analysis dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by