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?

 采纳的回答

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
Thank you for your answer! I made an external C function what can to manage the file.

类别

在 帮助中心 和 File Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by