Excel Exchange

1 post / 0 new
oavaldezi's picture
Federal Income Tax schedule (instead of flat rate) error

I've entered a Federal Income Tax schedule, with the rate at 0% for the first 10 years, and 30% afterwards. When I export to Excel with formulas, the values for "After-tax value of energy generated by system" and "After-tax cash flow" are in error, because their formulas reference the "federal_tax_rate" name, and they should reference the "AnnualTaxFederal" name.

2 posts / 0 new
Last post
Data Transfer from .xls Files

Is it possible to read the full contents of .xls files into an array, without having to name the range of cells being read (similar to how csvread can read .csv files to an array)?

3 posts / 0 new
Last post
Bulk CSV Exports

I have a mess of projects I'm modeling. I would like to export the summary, monthly, and annual data tables to csv for all the projects in bulk. All in one go instead of going from project to project and exporting each one by hand. Is it possible to script this in SAM? In case anyone's curious, I'm working up evaluations for several parcels of land in a small city. I want to get this all into something like R or Excel. I'm using R to make some prettier plots than SAM can do. Excel makes it easier to format tables for insertion into a written report.

3 posts / 0 new
Last post
Sending Values from SAM to excel

I want to send a calculated value from SAM to an excel-workbook using an lk script, I'm running the script with no errors but nothing is changing in the excel workbook Book100, I tried the same script also for different workbooks and also it's not working. Can someone please help me with that. Thank you

The Script:

/set the current SAM case

//create an Excel object and open the Excel file
xl = xl_create('C:/Users/Admin/Desktop/SAM work/Book100.xls.xlsm');
path = path_only( project_file() );

2 posts / 0 new
Last post
Hourly excel exchange input?


2 posts / 0 new
Last post
How do I export SAM to Excel including formulae?

I want to see how LCOE is calculated in SAM. How do I export the formula to Excel?

1 post / 0 new
Paul Gilman
SAM at MREA Energy Fair 2016

If you are planning to attend the Midwest Renewable Energy Fair this year (June 17-19, 2016) in Central Wisconsin, I will be giving a three-hour workshop on SAM on Friday, June 17 from 10 am to 1 pm. The workshop is free, but you'll need a ticket to the fair to attend. (This is an in-person workshop, not a webinar.)

I hope to see you there! If you do plan to attend, be sure to bring your laptop with SAM installed and let me know what you are interested in learning about so I can prepare examples for a demonstration.


6 posts / 0 new
Last post
Calculation error and question


Hi, I noticed that in the Single Owner PPA model there is a reference name error (carefully read the named reference in Cell P:214 on the Cash Flow Tab, it's easily fixed).

Separately, the depreciation allocation is pulled from cell B:80. Is this correct? It doesn't seem like capital reserves should be counted as depreciable assets. I've changed the link to cell B:67, but please let me know if I'm on the wrong track.

thanks so much, Robert

3 posts / 0 new
Last post
LK Script to Exchange Data with Excel

Hi !

I am trying to use an LK script code to exchange data between excel and SAM (the idea is to pre-size my PV system with excel, export the main outputs data to SAM and use the simulation to asses my system.

I have issue on importing the load profile on SAM. I want to import the load hour by hour, for each hour of the year, in the Energy Usage data.

For that, I created the following loop which seems to be okay when I simulates :

for( i=5; i<8766; i++) {

Energy_usage[i-5]= xl_get(xl,index);


4 posts / 0 new
Last post
Exchange settings (file names and variables) get cleared after

Dear Paul,

I have successfully used the exchnage feature of SAM before for CSP models. Currently, I am trying to use it for PV models and it works fine till I save and close my SAM model. When I reopen the SAM file all the exchange settings, including file name and variables are cleared.
Can you please let me know what the issue is. I am using version 2015..06.30.

Also, I cannot locate user parameters (that existed previously) in this versio od SAM.

Thanks for your help,

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer