ดู XBRL ไฟล์ผ่าน Python
การดูรายงานทางการเงินในรูปแบบ XBRL โดยไม่ต้องติดตั้ง Microsoft Office หรือซอฟต์แวร์อื่นๆ
วิธีดู XBRL ไฟล์
ทำตามขั้นตอนในข้อมูลโค้ดหรือปรับปรุงตามที่แอปพลิเคชันของคุณต้องการสำหรับการอ่านไฟล์ภาษาการรายงานทางธุรกิจที่ขยายได้ XBRL ตรวจสอบให้แน่ใจว่ามีข้อกำหนดในการอ่านในใบสมัครของคุณ
- สร้างอินสแตนซ์คลาส XbrlDocument2. ส่งชื่อไฟล์ XBRL ที่ถูกต้องเป็นพารามิเตอร์
- เพื่อให้ได้รายละเอียดภายในของไฟล์ ให้ใช้คลาสที่เกี่ยวข้อง เช่น SchemaRefCollection, Context, Unit
- แสดงข้อมูลเหล่านี้
ข้อกำหนดในการอ่าน
หากต้องการดูเอกสาร XBRL ต่อ ตรวจสอบให้แน่ใจว่าคุณมีข้อกำหนดเบื้องต้นดังต่อไปนี้
- ระบบปฏิบัติการที่ใช้ Microsoft Windows หรือ Linux- Python 3.5 หรือใหม่กว่า- Aspose.Finance สำหรับ Python ที่อ้างอิงในโครงการของคุณ
Python รหัสสำหรับอ่าน XBRL ไฟล์
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document = XbrlDocument(os.path.join(sourceDir, "IdScopeContextPeriodStartAfterEnd.xml")) | |
xbrlInstances = document.xbrl_instances | |
xbrlInstance = xbrlInstances[0] | |
facts = xbrlInstance.facts | |
schemaRefs = xbrlInstance.schema_refs | |
contexts = xbrlInstance.contexts | |
units = xbrlInstance.units |
ตัวเลือกการดูอื่นๆ
iXBRL (Inline Extensible Business Reporting Language)