- Copying data into a new sheet and then pasting it in MATLAB
- Pasting data into a cell array instead of normal array (as per the suggestion provided by the error message)
- Use the 'readtable' function: https://www.mathworks.com/help/matlab/ref/readtable.html
Why pasting Excel data in MATLAB generates an error?
14 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2019-6-3
编辑: MathWorks Support Team
2024-8-29
Why pasting Excel data in MATLAB generates an error?
The error looks like the following:
The data on the clipboard cannot be pasted into the array.
Note that MATLAB numeric arrays cannot contain strings. If you are trying to paste strings into the array, consider using a call array instead.
采纳的回答
MathWorks Support Team
2024-7-29
编辑:MathWorks Support Team
2024-8-29
This error can have different causes. Most of the times, this is caused by a specific option in your preferences.
Please open the MATLAB Preferences and go to MATLAB > Variables and check the "International number handling" configuration. If it is set to "." (Dot) then change it to "," (Comma) or vice versa.
Please run the below command in the command window of installed MATLAB R2019a version to get release specific documentation
>> web(fullfile(docroot, 'matlab/matlab_env/set-workspace-and-variable-preferences.html'))
If this does not resolve the issue, please try these other workarounds:
Please follow the below link to search for the required information regarding the current release:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!