Get Stream Summary Data from Aspentech Hysys or UniSim Design into Excel

  • Share
  • Share

Need to get stream data from your Aspen Hysys simulation into another format; say Microsoft Excel? It could be for a heat and material balance table, an equipment datasheet, or just data for a calculation. Try one of the following approaches to copy out the Hysys data.

Note: The program UniSim Design by Honeywell is, at the time of writing, almost identical to Hysys. Except for tip #5, most of these approaches should work just as well for UniSim.

  1. For small amounts of data you can copy and paste directly out of Hysys windows. Use the “copy with labels” command (shortcut Crtl-Shift-C) to copy both the data and the row/column heading names
  2. Go to Tools>Workbooks or hit Crtl-W. Create a workbook customized to show the data you want. Copy and paste into Excel. Crtl-shift-C works again
  3. Print the workbook instead of copying. When printing, select the Hysys workbook checkboxes “text-to-file” and “delimited.” When selected, instead of sending a report to the printer, Hysys will instead create a delimited text file that you can open in MS Excel. (In Excel, use Data>Text to columns to interpret the delimited data, and select commas to create new cells)
  4. Go to Tools>Reports or hit Crtl-R. and create a report displaying the data you need. Again use delimited text files to create a “report” you can read with spreadsheet programs
  5. Download the “Hysys Stream Reporter (HSR).” This is a sample Excel Macro, that uses Visual Basic coding to reach into the Hysys file and extract stream data. It is very easy to use and has instructions built right into the file. At time of writing you would use HSR 1.6 but you should search the Aspentech Support database for the latest version. You should note that as a “demo file” HSR is not subject to the same quality controls as normal Hysys features, and there is no technically no guarantee it will be available in future versions of Hysys. (Although unofficially, I have been told it is so popular they will likely be built for future versions of Hysys). I find it very convenient, but there is a risk that for very large files or simulations you have to upgrade to new versions that something will go wrong. I wouldn’t rely on HSR for major projects that will last several  years. Also, be aware that the program can be slow if you have a lot of stream data, and that it ties up both Excel and Hysys. You may want to test it by first writing a report with only a single stream property for all the streams of interest, to make sure that the connection to each stream is working correctly, before trying to get your full report out.
  6. You can use the Spreadsheet unit operation. Using the” Add Import” button in the “Connections” of your spreadsheet tab, you can pull in any variables (including stream or equipment properties) into a spreadsheet in any cells that you choose. Shortcut: You can also add variables to the spreadsheet by opening a Hysys window (say a stream or unit operation’s window), holding control, and using the right mouse button to drag the variable from the Hysys window and dropping it into your spreadsheet. Either way you add the variables, it is a little time consuming, but you can bring key data together in the orientation/order you like, and then copy and paste it to other programs. (Also, sometimes it is good to get an “executive summary” or “dashboard” of key data immediately within your simulation, as you try to tune the simulation).
  7. Create your own custom solution with Visual Basic programming to get data out of Hysys. You can also use it to pull data in, if you need to have Hysys interface to an external spreadsheet or program
  8. See if Aspen Simulation Workbook, which helps you create linkages between Hysys and Excel, can help you

Personally, I find Option #5 is the easiest, quite flexible and powerful. Option #5 also makes it very easy to mix and match streams from multiple simulation files or sub-flowsheets (like a column’s streams) into a single report.

Option #2 is also very flexible, takes a little longer to set up but you’ll get the reports faster and it’s less buggy. So I’d prefer option #5 for one-off problems and option #2 for lengthy problems where I can set up the Hysys file properly and keep developing the file going forward.

Option #6 is a good choice if you only need a tiny handful of variables, but many different types of variables from different places in the simulation. Note that you could also use the spreadsheet approach to bring together the variables that you might want to change as you tune a program, as well as the variables you want to copy and paste to an outside program.

Option #7 is the most powerful but requires programming knowledge and work.

P.S. The techniques in this post have been used with Hysys 2004-V7.1 and UniSim 2004-2006, and may not work with older or newer versions.

Edits:

2011-03-23 – Added option #8, Aspen Simulation Workbook

Print Friendly, PDF & Email
Share

About admin

I own and run smartprocessdesign.com
This entry was posted in Simulation & Thermodynamics and tagged , , , , , , , , , , . Bookmark the permalink.

5 Responses to Get Stream Summary Data from Aspentech Hysys or UniSim Design into Excel

  1. Romain says:

    Hello, it used to be possible to copy/paste special link “as text”, a direct link from HYSYS to Excel.
    Do you know if it is still available in combination with HYSYS 2006.2 and Excel 2007+.

    Thanks,
    romain

    • admin says:

      Romain,

      You reminded me of this program, which I’ve added to the post at Option #8: http://www.aspentech.com/products/aspen-simulation-workbook.aspx

      Could that be what you meant? Personally, Aspen Simulation Workbook and VBA coding are the only ways I know of to create a two-way link between Excel and Hysys. But maybe there was/is a different way that I am not aware of.

      • Romain says:

        Before Aspen HYSYS 2006, when copying from HYSYS to your sheet in Excel, you would (without an external sheet or software):
        _ ctrl+C in HYSYS
        _ paste special in Excel, “as text”, and the radio button “Paste link” activated.

        It was copying an address in the Excel cell, refreshing at opening of the sheet or when demanded.
        I am going to ask the question to AspenTech, this method is described in their knowledge base (the post extract is below , KB #108952 from 12-Aug-2005)

        “An extension of this is to paste a link to the data. This gives a live link, when the data in HYSYS changes, it is automatically updated in Excel. In Excel use the Edit … Paste Special menu command and then pick As Text in the listbox, and Paste Link on the radio buttons. Instead of pasting in the data, a special formula which links to the HYSYS data is written.”

Leave a Reply

Your email address will not be published. Required fields are marked *

− 2 = 2