Use Arelle to export XLSX file

949 views Asked by At

I'm trying to use Arelle to export a XLSX file from a zip of XBRL files. It works just fine when I use the EdgarRenderer plugin.

./arelleCmdLine -f data/goog-20151231.xml.zip --plugins EdgarRenderer --disclosureSystem efm-pragmatic --validate -r /home/out/

This produces a Financial_Report.xlsx file which is what I want. I'm trying to do this without generating the additional HTML files. I found the plugin saveLoadableExcel but I'm not sure how the commandline arguments work. I tried the following -

./arelleCmdLine -f data/goog-20151231.xml.zip --plugins saveLoadableExcel.py --save-loadable-excel --validate -r /home/out/

But I get the following error -

[info] Activation of plug-in Save Loadable Excel successful, version 0.9. - saveLoadableExcel.py [info] loaded in 6.58 secs at 2017-12-15T12:43:09 - /home/data/goog-20151231.xml.zip/goog-20151231.xml [info] validated in 9.68 secs - /home/data/goog-20151231.xml.zip/goog-20151231.xml [exception:saveLoadableExcel] File saving exception: 'bool' object has no attribute 'write' - goog-20151231.xml Exception ignored in: > Traceback (most recent call last): File "/usr/lib/python3.5/zipfile.py", line 1595, in del File "/usr/lib/python3.5/zipfile.py", line 1608, in close File "/usr/lib/python3.5/zipfile.py", line 1711, in _write_end_record File "/usr/lib/python3.5/zipfile.py", line 680, in write AttributeError: 'bool' object has no attribute 'write'

How can I export just the excel file? Thanks.

1

There are 1 answers

0
Niek On

The problem is the store_true on the option. This will store True in the saveLoadableExcel option which will be read by:

excelFile = getattr(options, "saveLoadableExcel", None)

You can copy this plugin and fix it in your project by removing the action="store_true", line and use that, or create a MR for Arelle.

Then you can create the excel by passing the destination like this --save-loadable-excel file.xlsx