Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

how to read data in Modelica from an excel sheet

how to read data in Modelica from an excel sheet

Hello,

   I have an Excel file and which it contains temperature values of one day, now I want to read all this data in modelica from an excel file

can any one help me, please?

thank you in advance fo your answer

Re: how to read data in Modelica from an excel sheet

You could convert it as text file and using a 1D-lookup-table block. Read further info here CombiTable1Ds

Re: how to read data in Modelica from an excel sheet

hi Arinomo23

Hello, thank you for your answer
can you explain to me how to write a txt file that Openmodelica accepts.
The excel file contains three columns, the first column corresponds to the time, the second column to the indoor temperature and the last column contains the external temperature

thank you

Re: how to read data in Modelica from an excel sheet

Basically if you read the link i attached on my prev comment you should write a matrix in text file with a certain format (see the link).

for your case maybe somthing like this:

Code:


#1
double TempMatrix (#ofRow, 3)
#time indoorTemp OutdoorTemp
value value value
value value value
value value value

You could just copy paste the values from excel.

Try to play around with 1D-Lookup table on OpenModelica.

There are 0 guests and 0 other users also viewing this topic
You are here: