Convert XBRL to iXBRL Easily

Convert XBRL to iXBRL Using Aspose.Finance for .NET

In today’s data-driven world, financial professionals often need to convert XBRL (eXtensible Business Reporting Language) files into iXBRL (Inline XBRL) format to ensure data is both machine-readable and human-readable. If you’re looking for a robust solution to accomplish this, Aspose.Finance for .NET is an excellent choice. This guide will walk you through the process step-by-step, from setting up your environment to successfully converting your files.

Prerequisites

Before we dive into the conversion process, let’s go over what you need:

  1. Basic Knowledge of .NET: Familiarity with C# and the .NET framework is essential.
  2. Aspose.Finance for .NET: You’ll need to download and install the Aspose.Finance for .NET library.
  3. XBRL Files: Ensure you have the XBRL files you intend to convert.
  4. Development Environment: A .NET development environment like Visual Studio.

Import Namespaces

To get started, you need to import the necessary namespaces into your project. This allows you to access the functionalities provided by Aspose.Finance.

using Aspose.Finance.Xbrl;
using System;
using System.Collections.Generic;

Step 1: Set Up Working Directories

First, you need to specify the directories for your source XBRL files and the output iXBRL files.

// Working directories
string sourceDir = "Your Source Directory";
string outputDir = "Your Output Directory";

Step 2: Load the XBRL Document

Next, you’ll load your XBRL document using the XbrlDocument class provided by Aspose.Finance.

XbrlDocument document = new XbrlDocument(sourceDir + @"IdScopeContextPeriodStartAfterEnd.xml");

This line of code initializes a new instance of the XbrlDocument class and loads the specified XBRL file.

Step 3: Set Save Options

To convert the document into a different format, you need to set the save options. For this tutorial, we’ll save the file in iXBRL format.

SaveOptions saveOptions = new SaveOptions();
saveOptions.SaveFormat = SaveFormat.iXBRL;

Here, SaveOptions is used to specify the format in which you want to save the document.

Step 4: Save the File

Now that everything is set up, you can save the XBRL document as an iXBRL file.

document.Save(outputDir + @"ConvertXbrlToiXbrl_out.ixbrl", saveOptions);

This command saves the converted file to the specified output directory.

Step 5: Confirm the Conversion

Finally, you can confirm the conversion by displaying a success message.

Console.WriteLine("ConvertXbrlToiXbrl executed successfully.");

Conclusion

Congratulations! You’ve successfully converted an XBRL file to iXBRL using Aspose.Finance for .NET. This powerful library simplifies the conversion process, enabling seamless transitions between different financial reporting formats. Whether you’re a developer or a financial professional, mastering this tool will undoubtedly enhance your productivity and efficiency.

FAQs

1. What is Aspose.Finance for .NET?

Aspose.Finance for .NET is a comprehensive library for managing financial formats such as XBRL, iXBRL, and OFX. It allows developers to create, read, and manipulate financial documents programmatically.

2. Can I try Aspose.Finance for .NET before purchasing?

Yes, you can download a free trial version from the Aspose releases page.

3. How do I get support for Aspose.Finance for .NET?

You can visit the Aspose.Finance support forum for assistance with any issues you encounter.

4. What are the main features of Aspose.Finance for .NET?

Aspose.Finance for .NET offers a wide range of features including the ability to create, read, and convert various financial formats, extensive API capabilities, and robust error handling.

5. Where can I find detailed documentation?

Detailed documentation is available on the Aspose.Finance documentation page.