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?

 Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 6 Août 2012

1 vote

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.

Plus de réponses (1)

Gabor
Gabor le 14 Août 2012

0 votes

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

Catégories

En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by