Repository navigation
Updates to scripting and reports for CPA macro functionality - #2121
Conversation
casewin - add ExportCasflowExcel reports - fix multiple table header lines script - add fcall_export_cashflow_excel macro - include invoke.h results - move Export from private to public
cpaulgilman
left a comment
There was a problem hiding this comment.
For LK function export_cashflow_excel():
- Function returns Null instead of boolean:
-
For PVWatts / No Financial case, function opens empty Excel file. For configs with no financial model, I think it should return False and not open Excel.
-
The function runs a simulation, which means that in some cases (like the CPA macros) it runs a simulation when there are already results. It might be best to a) not run a simulation and return a message if there are no results, or b) add a flag parameter that determines whether to run a simulation.
-
In Linux, the function runs and returns Null. I think it should return False.
-
What is the "page name" input parameter?
-
After opening Excel, the function displays the SAM Results window. I think that should be left to the script writer: If they want to display a page, they can use show_page() after calling the function.
|
With commit 0a4b9c0, the fcall_export_cashflow_excel performs as follows:
3. case with no financial model - returns 0 (false from script)
4. case not yet run - returns 0 (false from script)
5. after base case run - returns 1 (true from script)
|
* Use cf_om_fixed_expense to determine if financial model is cash flow-based * Run simulation only if there are no results in base case * Revise message text
cpaulgilman
left a comment
There was a problem hiding this comment.
Thanks @sjanzou. I made some additional changes based on your updates. I think this looks good now.




Changes
casewin - add ExportCasflowExcel
reports - fix multiple table header lines
script - add fcall_export_cashflow_excel
macro - include invoke.h
results - move Export from private to public
Easiest way to test is to