Get selected range in Excel file using MATLAB
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I have seen a MATLAB GUI program that is able to open the Excel file and get the range of the cells that the user have selected. This value is returned to MATLAB.
I have no idea how it is possible since the Excel file is normal without any macro. Additionally, when MATLAB opens an Excel file, it does not run anymore so how possible can we obtain anything from Excel ?
Thank you very much in advance.
0 个评论
采纳的回答
Fangjun Jiang
2011-9-9
The function is probably uiimport. Type uiimport in Command Window to start.
You can also use xlsread(). Type help xlsread to find out.
4 个评论
Fangjun Jiang
2011-9-9
That's true. You could open the .xls file outside of MATLAB, select the data and copy it (press Ctrl+C), then at the first dialog of uiimport, Select "Clipboard" instead of "File". I just did it and it works.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!