通过 C# 查看 XBRL 个文件
无需安装 Microsoft Office 或任何其他软件即可查看 XBRL 格式的财务报告。
如何查看 XBRL 文件
按照代码片段中的步骤操作或根据您的应用程序需要对其进行增强,以读取可扩展的业务报告语言 XBRL 文件。确保在您的应用程序中有阅读要求。
- 创造 XbrlDocument 类 实例。2. 将有效 XBRL 文件的名称作为参数传递。
- 要获取文件的内部详细信息,请使用相关类,例如 SchemaRefCollection , 语境 , 单元
- 显示这些信息
阅读要求
要继续查看 XBRL 文档,.NET Finance API 是包含在应用程序中的主要要求。
- 通过命令行将其安装为
nuget install Aspose.Finance
或通过 Visual Studio 的包管理器控制台使用Install-Package Aspose.Finance
进行安装。 - 或者,从 ZIP 文件中获取离线 MSI 安装程序或 DLL 下载 .
C# 代码读取 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
XbrlDocument xbrlDoc = new XbrlDocument(XbrlFilePath + @"Id-Scope-Context-Period-Start-After-End.xml"); | |
XbrlInstanceCollection xbrlInstances = xbrlDoc.XbrlInstances; | |
XbrlInstance xbrlInstance = xbrlInstances[0]; | |
List<Fact> facts = xbrlInstance.Facts; | |
SchemaRefCollection schemaRefs = xbrlInstance.SchemaRefs; | |
List<Context> contexts = xbrlInstance.Contexts; | |
List<Unit> units = xbrlInstance.Units; |
其他查看选项
iXBRL (内联可扩展业务报告语言)