LoadFromExcel.py plugin

189 views
Skip to first unread message

Ahmed

unread,
Aug 21, 2023, 2:31:14 AM8/21/23
to Arelle-users
Hello,

from examining the plugin loadfromExcel.py script, I see that the excel file should contain a "DTS" sheet. Could anyone please tell me what should this sheet contain or maybe provide with an illustrative example. I obviously want to get an xbrl file from the excel file containing the financial data, but I still dont get the DTS sheet. Thanks in advance

Ahmed

Austin Matherne

unread,
Aug 22, 2023, 5:15:00 PM8/22/23
to Arelle-users
Hi Ahmed,

Attached is an example using the DEI 2023 taxonomy. The loadFromExcel plugin is designed to work with the saveLoadableExcel plugin.

Kind regards,
Austin Matherne | Arelle Team

dei-2023.xlsx

bhavana prasad

unread,
Oct 2, 2023, 7:32:42 AM10/2/23
to Arelle-users
Hi Austin,

We are trying to generate XMLs by using the loadFromExcel plugin. We have couple of questions:

1. What is the command to invoke loadFromExcel plugin. So far we tried several command combinations but all of them resulted in errors. 

2. How to create the Excel sheets. There is not much help/documentation related to each tab, column and rows in excel. So we just used the widget excel as a template. We are able generate XMLs using the Arelle GUI tool. But these XMLs are mostly blank. Not sure if we are doing things correctly. 

Can you please help. 

Thanks
Prasad

Gregorio Mongelli

unread,
Oct 3, 2023, 3:00:54 AM10/3/23
to Arelle-users
Hello,

The SaveLoadableExcel plug-in takes as input a taxonomy extension and creates an XLSX workbook capturing all the useful characteristics of a taxonomy extension.

The command line option to generate the XLSX file is "--save-loadable-excel".  See https://arelle.readthedocs.io/en/latest/command_line.html

That XLSX file can then be edited to edit concepts, presentations or computations.

The LoadFromExcel plug-in takes that Excel file and generates back the 5 or 6 files that build up a taxonomy extension.

Do you want to create a taxonomy extension or an XBRL instance?

Best regards,

Greg 

Message has been deleted

Mongelli, Gregorio

unread,
Oct 3, 2023, 7:48:20 AM10/3/23
to arelle...@googlegroups.com
Hello,

As a matter of fact, the variant

arelleCmdLine --plugin loadFromExcel -f /home/ubuntu/Downloads/TDH-Ch5-Widget-Taxonomy.xlsx

should work as expected.

It might also be usefull to supply the option --save-Excel-DTS-directory to specify where the files should be output.

Best regards,

Greg

On Tue, Oct 3, 2023 at 11:45 AM bhavana prasad <bhavana...@soulpageit.com> wrote:
Thank you Greg. This is very helpful.

One more question: is there any way to invoke loadFromExcel plugin directly from command line or through Python. When we tried this command

"arelleCmdLine --plugin=loadFromExcel -f /home/ubuntu/Downloads/TDH-Ch5-Widget-Taxonomy.xlsx"

we are getting below error

   pluginXbrlMethod(self, options, modelXbrl, _entrypoint, responseZipStream=responseZipStream)
  File "/home/ubuntu/lib/python3.11/site-packages/arelle/plugin/loadFromExcel.py", line 1937, in cmdLineXbrlLoaded
    if options.saveExcelDTSdirectory and getattr(modelXbrl, "loadedFromExcel", False):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RuntimeOptions' object has no attribute 'saveExcelDTSdirectory':

Thanks
Prasad

--

---
You received this message because you are subscribed to a topic in the Google Groups "Arelle-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/arelle-users/_FSE7xf7sAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to arelle-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arelle-users/c6ae6495-8088-4894-a3bf-6a30676aff15n%40googlegroups.com.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Arelle-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/arelle-users/_FSE7xf7sAs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to arelle-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arelle-users/CAEnr2ZOkgVdKaFbp0k5YJpcMPsh48uQDjAWJNO38ZQqK1kBCVQ%40mail.gmail.com.

bhavana prasad

unread,
Oct 4, 2023, 7:00:23 AM10/4/23
to Arelle-users
Thanks a lot. It worked and we are able to generate XML from command line by passing an XLSX file as input. 

I have one more question: 

We notice the EDGAR HTML files are also being modified by the financial tagging software like GoFiler. Some noticeable changes:

1) the root tag is changed to <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:ix="http://www.xbrl.org/2013/inlineXBRL" xmlns:ixt="http://www.xbrl.org/inlineXBRL/transformation/2015-02-26" xmlns:ixt-sec="http://www.sec.gov/inlineXBRL/transformation/2015-08-31" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:dei="http://xbrl.sec.gov/dei/2023" xmlns:ref="http://www.xbrl.org/2006/ref" xmlns:us-gaap="http://fasb.org/us-gaap/2023" xmlns:us-roles="http://fasb.org/us-roles/2023" xmlns:country="http://xbrl.sec.gov/country/2023" xmlns:srt="http://fasb.org/srt/2023" xmlns:mays="http://mays.com/20230430">


2) Below tags added below head 

<!-- Field: Set; Name: xdx; ID: xdx_02C_US%2DGAAP%2D2023 -->
<!-- Field: Set; Name: xdx; ID: xdx_038_mays_mays.com_20230430 -->
<!-- Field: Set; Name: xdx; ID: xdx_04B_20230201_20230430 -->
<!-- Field: Set; Name: xdx; ID: xdx_05D_edei%2D%2DEntityCentralIndexKey_0000012345 -->
<!-- Field: Set; Name: xdx; ID: xdx_059_edei%2D%2DAmendmentFlag_false -->
<!-- Field: Set; Name: xdx; ID: xdx_06B_USD_1_iso4217%2D%2DUSD -->
<!-- Field: Set; Name: xdx; ID: xdx_062_Shares_2_xbrli%2D%2Dshares -->
<!-- Field: Set; Name: xdx; ID: xdx_06D_USDPShares_3_iso4217%2D%2DUSD_xbrli%2D%2Dshares -->

3)  Below tag added in 1st Div tag:

<ix:header>
<ix:hidden>
<ix:nonNumeric contextRef="From2023-02-01to2023-04-30" name="dei:EntityCentralIndexKey">0000012345</ix:nonNumeric>
<ix:nonNumeric contextRef="From2023-02-01to2023-04-30" name="dei:AmendmentFlag">false</ix:nonNumeric>
</ix:hidden>
<ix:references>
<link:schemaRef xlink:href="mays-20230430.xsd" xlink:type="simple" />
</ix:references>
<ix:resources>
<xbrli:context id="From2023-02-01to2023-04-30">
<xbrli:entity>
<xbrli:identifier scheme="http://www.sec.gov/CIK">0000012345</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:startDate>2023-02-01</xbrli:startDate>
<xbrli:endDate>2023-04-30</xbrli:endDate>
</xbrli:period>
</xbrli:context>
<xbrli:context id="From2023-10-022023-10-02">
<xbrli:entity>
<xbrli:identifier scheme="http://www.sec.gov/CIK">0000012345</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:startDate>2023-10-02</xbrli:startDate>
<xbrli:endDate>2023-10-02</xbrli:endDate>
</xbrli:period>
</xbrli:context>
<xbrli:unit id="USD">
<xbrli:measure>iso4217:USD</xbrli:measure>
</xbrli:unit>
<xbrli:unit id="Shares">
<xbrli:measure>xbrli:shares</xbrli:measure>
</xbrli:unit>
<xbrli:unit id="USDPShares">
<xbrli:divide>
<xbrli:unitNumerator>
<xbrli:measure>iso4217:USD</xbrli:measure>
</xbrli:unitNumerator>
<xbrli:unitDenominator>
<xbrli:measure>xbrli:shares</xbrli:measure>
</xbrli:unitDenominator>
</xbrli:divide>
</xbrli:unit>
</ix:resources>
</ix:header>
</div>


4) The below tag added around the tagged text:

<span id="xdx_902_edei--DocumentType_c20231002__20231002_zSAt0ZdFwhs8"><ix:nonNumeric contextRef="From2023-10-022023-10-02" name="dei:DocumentType">10-Q</ix:nonNumeric></span>


We are not sure about the importance of these changes. Glad if you can share some insights. 

Thanks
Prasad

Gregorio Mongelli

unread,
Oct 5, 2023, 2:56:05 AM10/5/23
to Arelle-users
Hello,

Yes, I confirm that these changes are important:

1) The root tag contains namespace declartions. They tell the XML processor which XML schema definitions to use. You can find more on XML schema definitions and about namespaces at https://www.w3.org/ 
2) These are XML comments and probably only useful for the software you have used. XBRL never coneys important information through XML comments.
3) and 4) The added XML elements are at the heart of inline XBRL. The general idea of inline XBRL is that you take a plain XHTML file containing for instance financieal statements and that you tag the facts (amounts) with special inline XBRL elements. You also give the context of these facts to define precisely what the fact is supposed to mean. The inline XBRL specifications can be found at https://specifications.xbrl.org/spec-group-index-inline-xbrl.html

Best regards,

Greg

bhavana prasad

unread,
Oct 5, 2023, 10:53:00 AM10/5/23
to arelle...@googlegroups.com
Thank you Gregorio. This is very helpful. 

Best
Prasad

You received this message because you are subscribed to the Google Groups "Arelle-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to arelle-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/arelle-users/c5e2cfdd-1f7e-4259-b999-871d703700c9n%40googlegroups.com.

bhavana prasad

unread,
Oct 27, 2023, 4:55:49 AM10/27/23
to Arelle-users
Hi @Gregorio 

We are trying to generate iXBRL (XML files + XSD) using Excel sheet. In this process we have been appending US-GAAP 2023 Schema information into the DTS

However this information is not getting generated into the XSD file as expected. Please find attached the XSX file and the generated XML, XSD Files. Not sure if we are doing anything wrong. Please help. 


Thanks
Prasad
widget-2022-12-31.xsd
widget-2022-12-31_def.xml
widget-2022-12-31_pre.xml
widget-2019-12-31 - Copy (1).xlsx
widget-2022-12-31_lab.xml
widget-2022-12-31_cal.xml
Reply all
Reply to author
Forward
0 new messages