엑셀 파일의 텍스트 데이터를 matlab appdesigner 의 UITable로 불러 들일 때 엑셀에 적용되어 있는 줄 바꿈 사항을 matlab에도 적용하는 방법
2 views (last 30 days)
Show older comments
엑셀 파일의 텍스트 데이터를 matlab appdesigner 에서 readtable 로 불러 들인 후 UITable app 으로 출력하려고 합니다.
하지만 엑셀 파일의 텍스트 데이터에 적용되어 있는 줄 바꿈 사항이 UITable에는 적용되지 않고 가로로 나열되고 있어 어떻게 하면 좋을 지 질문 드립니다.
function LoadButtonPushed(app, event)
[Fn,Fp]=uigetfile('*.*');
UITable_data = readtable(fullfile(Fp,Fn),'Sheet','sheet1');
app.UITable.Data = UITable_data;
end
0 Comments
Accepted Answer
Angelo Yeo
on 14 Sep 2023
Edited: Angelo Yeo
on 14 Sep 2023
해당 이슈는 UITable에서 여러 줄로 표현된 스트링을 표현하는 것이 지원되지 않기 때문에 발생하는 이슈입니다. 지금으로써는 UITable에서 해결이 불가능합니다. 아래의 예시를 통해 확인하여 주십시오.
data = ["foo", "bar", "foo"+newline+"bar"];
t = table(data,'VariableNames',"Foo")
writetable(t, "test_write.xlsx","UseExcel",true)
uit = uitable("Parent",uifigure(),"Data",t);
해당 이슈에 대해 추후 릴리즈에서 기능이 향상될 수 있도록 개발팀에 보고하도록 하겠습니다.
2 Comments
Angelo Yeo
on 15 Sep 2023
도움되었다면 좋겠습니다. 만약 도움이 되셨다면 답변을 채택해주시면 감사하겠습니다. 채택된 답변이 있다는 사실만으로도 다른 유저들에게 도움이 될 수 있습니다.
More Answers (0)
See Also
Categories
Find more on GUIDE 앱 마이그레이션하기 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!