You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create Excel addin/add larray buttons in CIC tools #349
Using xlwings, it would be relatively easy to have an larray addin adding a ribbon button with something like "open in LArray editor". When something is selected, it would do the opposite of "copy to Excel". When nothing is selected, it would either copy the whole sheet (like in the editor) or copy all the sheets via something like (experimental code in start.py):
defrun_from_excel():
ifos.name=='nt':
sys.stdout=open(os.devnull, "w")
sys.stderr=open(os.path.join(os.getenv("TEMP"), "stderr-"+os.path.basename(sys.argv[0])), "w")
s=Session()
# -1 is for "active", but using the caller *might* be better ( wb = xw.Book.caller() )s.load(-1, engine='xlwings_excel')
edit(s)
In Excel, the code is simply:
SubRunViewer()
RunPython ("from larray_editor.start import run_from_excel; run_from_excel()")
End Sub
maybe having two different buttons would be better :
copy selection to larray (nothing selected open current sheet)
open sheets in larray
adding the buttons to the cic tools would probably be better but then we need to either
have the buttons only appear if larray is installed (or greyed out if not installed?)
have the buttons spit a nice error message if python/larray is not installed
bundle the whole thing (python, larray etc.) with the cic tools
Activity