其实很简单,读取前设置’PreserveVariableNames’就可以了,否则会报错如下:
Warning: Column headers from the file were modified to make them valid MATLAB
identifiers before creating variable names for the table. The original column
headers are saved in the VariableDescriptions property.
Set 'PreserveVariableNames' to true to use the original column headers as table
variable names.
示例代码
注意filename改成你的xlsx的名字即可。
filename