Collecting user input to collect data from an EXCEL file

1 view (last 30 days)
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?

Answers (1)

ES
ES on 24 Sep 2013
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.

Community Treasure Hunt

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

Start Hunting!