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?

 Accepted Answer

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.

More Answers (1)

Gabor
Gabor on 14 Aug 2012
Thank you for your answer! I made an external C function what can to manage the file.

Categories

Community Treasure Hunt

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

Start Hunting!