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
Walter Roberson 2022년 12월 26일
It is probably operating in 'basic' mode, which does not support csv files.

댓글 수: 3

Thank you @Walter Roberson!
Can you please explain what is the meaning in 'basic' mode?
Does it refer to the Compiler or to the Matlab package we're using?
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.
Thank you agian @Walter Roberson.
I'll explore these alternatives.
Happy holidays!

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

Uri
2022년 12월 26일

댓글:

Uri
2022년 12월 27일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by