Using SAM with Excel

5 posts / 0 new
Last post
Victor Enzo
Using SAM with Excel

Hi,
I would like to use input from an Excel file to run a simulation in SAM and maybe make SAM to write the results in another Excel file (automatically). Is this, or something similar, possible?

Thanks in advance

Paul Gilman

Dear Victor,

There are two ways you can exchange data between SAM inputs and an Excel workbook. You can use SAM's Excel Exchange feature (see the Excel Exchange topic in SAM's Help system, under "References."), or you can write an LK script.

For examples of how to do both, please see the files on the new SAM Sample Files page.

Best regards,

Paul.

Victor Enzo

Dear Paul

Thank you for the fast reply. I was able to run the LKscript downloaded from the SAM Sample Files page. Can I run the script from external programs? (like an Excel macro).

Thanks in advance

Paul Gilman

Dear Victor,

It is not possible to set the value of SAM inputs from outside of SAM.

However, if you are a software programmer, you can use the SAM software development kit to run SAM simulation modules without the SAM user interface. The SDK is a set of tools to work with the SAM Simulation Core (SSC) application programming interface (API). You can access the API in its native C, or using the language wrappers we've written for Java, C#, Python and MATLAB. We are considering writing a Microsoft VBA wrapper in the future, but do not have one now.

Best regards,

Paul.

Victor Enzo

Dear Paul,

I'll try to solve my problem in a different way.
Thank you for your help.

Best regards,
Victor

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer