- How many sheets Frequency Sweep.xlsx has?
- What value you're using for i?
- What value you're using for start?
- What OS are you using?
readmatrix is no longer able to read specific sheets using an integer that represents the location of the sheet (starting MATLAB 2019b)
22 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I used this code to load specific sheets from my excel file into MATLAB.
index=readmatrix('Frequency Sweep.xlsx','Sheet',i,'Range',sprintf('A%d',start));
this would load data from sheet number " i ". But since I have updated to MATLAB 2019b, this code doesn't work anymore and it only calls the data from the first sheet.
Does anyone know how to fix this?
Thank you
2 commentaires
Steven Lord
le 25 Oct 2019
Can you answer these questions?
Amir Darabi Noferesti
le 25 Oct 2019
I have attached the excel file. It has 10 sheets and "i" is in a for loop, starting from 1 to 10.
"start" is also where the data starts in the spreadsheet, which is 63.
My OS is windows 10, 64-bit version 1903.
I just ran the same code in MATLAB 2019a and it worked. I guess there is something wrong with the newer version.
Réponses (1)
Vinai Datta Thatiparthi
le 1 Nov 2019
Hey Amir!
Use the UseExcel parameter to get your expected output. From R2019b revision of MATLAB, UseExcel is also used as a logical value that specifies weather or not to read the spreadsheet file using Microsoft ® Excel ® for Windows ®.
index=readmatrix('Frequency Sweep.xlsx','UseExcel',1,'Sheet',i,'Range',sprintf('A%d',start));
If you wish to read further on how to work with readmatrix, enter this command in the command window -
help readmatrix
Hope this helps!
0 commentaires
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!