Collecting user input to collect data from an EXCEL file

조회 수: 1 (최근 30일)
Caleb
Caleb 2013년 9월 24일
I have an EXCEL file with chemical data in it (if you're wondering, critical pressures, critical temperatures, and acentric factors) for about 100 compounds. I want to allow the user to enter the names of the chemical compounds that they want to use in their simulation (if you're wondering, I'm designing an m-file that calculates compressibility factors using various equations of state) and then collect the necessary data from the EXCEL file.
I want to do this without using the xlsread() function because it will take a lot of time to read in all that data, unless I can specifically read in the three, four, or five compounds without reading in all the others or doing four or five different xlsread() calls to get each compound, as that will cost some computing time.
Any tips to do this effectively?

답변 (1개)

ES
ES 2013년 9월 24일
I would suggest you to read all the data once (using xls read, or ActiveX if you need speed), and then keep it in memory. Use the constants from these loaded values as and when you need it. According to me this would be faster than reading the file for every different compound.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by