Importing Excels sheets into app desinger
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Kyle Koutonen
am 27 Feb. 2021
Bearbeitet: Cris LaPierre
am 30 Mär. 2021
I'm making an app and one part is importing a a table from excel to a table in matlab app designer. and the code i wrote up allows me to import an excel file put onlly if it has one sheet if not it won't work. I want to fix it so that with a numerical enter feild I can input a number then that sheet of that excel sheet will be imported.
[file,path,indx]=uigetfile;
filename=[path file];
I=importdata(filename);
app.t=I.data
app.s=I.textdata;
app.UITable.Data=app.t
app.UITable.ColumnName=app.s;
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 27 Feb. 2021
Bearbeitet: Cris LaPierre
am 30 Mär. 2021
The importdata function does not have an input for specifying Sheet. I suggest using readmatrix or readtable, which do allow you to specify which sheet to import using a number. Since you are already using importdata, readmatrix is probably the most similar to your current workflow.
I=readmatrix(filename,'Sheet',1);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!