We will be performing a major infrastructure and web site ugprades on Friday, September 27th 8:00 am - 5:00 pm MST (UTC -7).

The website will be down during that time.

Call SAM using Excel VBA

  • xpeng37@wisc.edu
  • Topic Author
More
06 Jul 2018 13:40 #6328 by xpeng37@wisc.edu
Call SAM using Excel VBA was created by xpeng37@wisc.edu
Hi Paul,

Is it possible to call SAM directly from EXCEL using vba code?
I think it could since the code generator can generate vba code. I try that but it generated a bunch of csv files, I go through them and could not figure out where the vba code sits?
Could you point me to the code or provide me with an vba call SAM example?

Thanks,
Xinyue

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

  • pgilman
More
06 Jul 2018 15:42 #6329 by pgilman
Replied by pgilman on topic Call SAM using Excel VBA
Dera Xinyue,

Yes. You can use SAM's code generator to generate VBA code, and then use that in Excel.

When you use the code generator, you should see a bunch of CSV files that store inputs that are large arrays or tables along with a .bas file that contains the code. For example, if you run the code generator from a case named "untitled," you should see a file named untitled.bas along with the CSV files you mentioned, and copies of th ssc.dll and sscapi.h files

Also, to see other discussions about using VBA with SAM, see these search results:

sam.nrel.gov/search/site/vba

Best regards,
Paul.

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

Moderators: pgilman
Powered by Kunena Forum