Take number from excel in App Designer
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Daniel
el 2 de Nov. de 2022
Respondida: Hiro Yoshino
el 2 de Nov. de 2022
Hi, I want to load numbers from my excel, I first used readcell but it gives me this error:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1177418/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1177423/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1177428/image.png)
I have this numbers, and I used xlsread, it works but only worked for the first 9 (all cells from C3 to C11), but when I try to read the others (C13 to C24) gives me the same error.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1177433/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1177438/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1177443/image.png)
Theres a way to read numbers using readcell (or another option), and if I need to use xlsread, why the firsts works perfect but the next numbers no?
0 comentarios
Respuesta aceptada
Hiro Yoshino
el 2 de Nov. de 2022
readcell returns a "cell" value but not a double scalar. This is where you made a mistake.
Let me convert cell to double.
First, let's generate cell sample:
c = {1}
and this can be converted to double as follows:
cmat = cell2mat(c)
class(cmat)
The cmat is a double scalar and this is the data format that your components asks for.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!