Enhance SAM with features tailored to your specific needs! We collaborate with companies, universities, and organizations to privately fund new capabilities or analyses. Your investment drives innovation while benefiting the broader energy community. Email us to learn more.

Linking Excel tables to SAM without scripting (v2026.7.3)

  • Andres Leonardo Giolitti Garcia
  • Topic Author
More
08 Oct 2026 08:55 #14615 by Andres Leonardo Giolitti Garcia
Linking Excel tables to SAM without scripting (v2026.7.3) was created by Andres Leonardo Giolitti Garcia
Hi everyone,I am an Electrical Engineering student currently working on my academic internship project using SAM version 2026.7.3.I have built an external parameterization and sizing spreadsheet entirely in Microsoft Excel. I would like to transfer these input values into SAM and retrieve the simulation results back into Excel.Since I am working exclusively with Excel and looking for a no-code workflow within the desktop interface:
  1. Is the built-in Parametrics tool (copying/pasting columns directly into the inputs table) the standard/recommended way to handle this workflow?
  2. Does SAM offer any direct dynamic link, CSV import, or native data-exchange feature with Excel spreadsheets without requiring LK scripts or Python?
  3. What is the cleanest way to export the resulting simulation outputs back into Excel for final analysis?
Any tips or recommended practices for an Excel-to-SAM workflow would be greatly appreciated.Thank you!Andrés

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
08 Oct 2026 11:03 #14616 by Paul Gilman
Hi Andrés,

1. Parametric simulations work well when you are working with one or two input variables. LK script is better when you are working with more variables because the parametric user interface gets unwieldy when there are a lot of variableds. LK script gives you full control over assigning values to variables and has tools for reading and writing data from Excel and text files, and has some basic plotting functions. For more about LK script, see sam.nlr.gov/lk-script.html .

2. SAM's Excel Exchange feature can read and write values of SAM input variables from and to an Excel workbook. This feature only works on Windows, so you cannot use it on Mac or Linux versions of SAM. See the Reference, Excel Exchange topic in Help for details:  natlabrockies.github.io/SAM/doc/reference/excel_exchange.html .

3. After you run parametric simulations, you can click **Export,  Send to Excel** (Windows only) or **Export, Send to CSV** to export parametric results to Excel. However, the format is a little hard to work with, so you'll have to do some processing in Excel to format the data. (For Excel, the results for each input is exported to a separate sheet, for CSV the results are formatted in a single table.) You can also import a CSV file with parametric input variables and their values. For details see Simulation Options, Parametric Simulations in Help:  natlabrockies.github.io/SAM/doc/simulation-options/parametrics.html .

Please let me know if you have any questions about how this works after reading these descriptions or need help getting things set up.

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum