+1 vote

Is there an automatic way of exporting the results visible in the "Contribution Tree" to a datasheet for Excel or for OpenOffice (.ods /.ots extensions) ?
It should be a quite simple routine which automatically expands some of the contributions (those above a set percentage), copy them and paste them in a single data sheet, named for example with the name of the impact indicator under consideration.
This could be repeated, automatically, for all the impact indicators, creating a file with multiple sheets.
Manually copying and pasting appears very frustrating and time-consuming.
Thanks, and hopefully waiting for an answer from you all.

in openLCA by (300 points)
edited by

3 Answers

+1 vote
by (102k points)
selected by
Best answer
Hi, Frank, yes that is an interesting idea but as Jonas has said, you for now need to expand what you want to export from the tree, or expand the entire tree, select it (ctrl+a), right-click and copy, and paste to excel. This is - we think - already quite powerful. However, no automatic support directly of expanded trees; for the other excel exports, also no automatic export routine exists in openLCA as you are maybe aware. It could be added via python. If someone wants to post an example, that would be nice of course.
0 votes
by (23.6k points)
edited by

You can export results to Excel via the Export to Excel button in the main menu.

Open source office suites such as LibreOffice can handle *.xlsx files which you can then import into *.ods/*.ots.

However, at the point of writing (openLCA 1.7), the contribution tree is not included in the generated Excel files and have to be exported manually via copy and paste.

by (23.6k points)
I updated my answer accordingly.
0 votes
by (420 points)

I've created a script that will automatically expand the contribution tree above a specified threshold after which the data can easily be copied and pasted into any other program.

You can find the script here https://ask.openlca.org/4499/how-to-export-contribution-tree-data