通过 Python 将 OFX 请求文件从 1.03 格式转换为 2.2 格式
OFX 无需安装 Microsoft Office 即可请求将文件从 1.03 转换为 2.2。
Aspose.Finance 通过 .NET 为 Python 是一种 API 来处理 XBRL、iXBRL 格式,开发人员可以轻松构建业务流程管理、财务分析和报告软件应用程序来转换、创建、读取、查看和验证 XBRL、iXBRL 和 {5 } 财务相关文件。
如何将 OFX 请求文件从 1.03 格式转换为 2.2 格式
- 使用 OfxRequestDocument 类加载输入文件。1. 使用来自 OfxVersionEnum 的 ofxVersion V2x 作为 Save 方法中的参数。1. 通过提供目标文件和ofxVersion来调用save方法。
转换要求
要继续将 OFX 请求文件从 1.03 转换为 2.2,请确保您具有以下先决条件。
- 基于 Microsoft Windows 或 Linux 的操作系统。- Python 3.5 或更高版本。- Aspose.Finance 表示您的项目中引用的 Python。
OFX 请求文件从 1.03 到 2.2 格式转换的 C# 代码
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
# Convert OFX Request File from 1.03 to 2.2 format | |
document = OfxRequestDocument(os.path.join(sourceDir, "bankTransactionReq.sgml")) | |
document.save(os.path.join(outputDir, "bankTransactionReq.xml"), OfxVersionEnum.V2x) |