How to compile a matlab code in deploytool, that contain xlsread function?
显示 更早的评论
Hi all,
I'm getting this error while trying to run my matlab code after it was compiled:

The code works perfectly in editor mode and contain 'xlsread' function
anyone know how to solve this?
thank you
Dan
回答(1 个)
Walter Roberson
2022-12-26
1 个投票
It is probably operating in 'basic' mode, which does not support csv files.
3 个评论
Uri
2022-12-27
Walter Roberson
2022-12-27
编辑:Walter Roberson
2022-12-27
xlsread used with interactive matlab calls over to excel if excel is installed and MS Windows is being used. If Excel is not installed or Windows is not being used then xlsread has some fallback routines that it can call. Those routines can handle some of the binary formats but not text formats.
The situation for xlswrite on the other hand is that if excel is not installed or Windows is not being used, then only csv files can be written.
If you have a csv file that is pure numeric after any header rows, or in which any non-numeric columns are leading columns that are to be skipped then you can use csvread() or dlmread(). If you have a more complicated csv file then textscan()
But readtable and readmatrix can be used without excel or windows and are more flexible.
Uri
2022-12-27
类别
在 帮助中心 和 File Exchange 中查找有关 MATLAB Compiler 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!