How can generated C code read an excel file?

Hi!
I have a Simulink model, what reads an excel file, when it is opened. I'd like to generate C code from this model, what makes the same procedure. So this C code must to read the excel file, when it is opened / ran. How can I do this?

 채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 8월 6일

1 개 추천

I'm guessing that you are reading the Excel file from one of the model Callback Functions - if yes, please note that these functions are only executed during simulation time in Simulink - no code is generated from them. You might be able to generate C code from MATLAB code if you are calling your code from a MATLAB Function block which is part of your model, but functions like XLSREAD are not supported for code-generation.

추가 답변 (1개)

Gabor
Gabor 2012년 8월 14일

0 개 추천

Thank you for your answer! I made an external C function what can to manage the file.

카테고리

도움말 센터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!

Translated by