Skip to content

Commit 7994e30

Browse files
committed
finance load options documentation
1 parent 747733c commit 7994e30

1 file changed

Lines changed: 206 additions & 0 deletions

File tree

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
---
2+
id: load-finance-document-with-options
3+
url: conversion/net/load-finance-document-with-options
4+
title: Load finance document with options
5+
weight: 16
6+
description: "Learn how to load and convert finance documents (XBRL, iXBRL) with advanced options using GroupDocs.Conversion for .NET API."
7+
keywords: Load finance document, Load and convert XBRL document, Load and convert iXBRL document, Load financial reporting files
8+
productName: GroupDocs.Conversion for .NET
9+
hideChildren: False
10+
toc: True
11+
---
12+
[**GroupDocs.Conversion**](https://products.groupdocs.com/conversion/net) provides [FinanceLoadOptions](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/financeloadoptions) to control how source finance documents are processed. Finance documents include XBRL (eXtensible Business Reporting Language) and iXBRL (inline XBRL) files used for financial reporting.
13+
14+
The following options are available:
15+
16+
| Option | Description |
17+
|--------|-------------|
18+
|**[Format](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/financeloadoptions/format)** | The document type is auto-detected during loading, but you can explicitly specify the source format. Available options are: *Xbrl, IXbrl* |
19+
20+
## Load XBRL document
21+
22+
The following code snippet shows how to load an XBRL document with explicit format specification:
23+
24+
With v24.10 and later:
25+
26+
```csharp
27+
using GroupDocs.Conversion;
28+
using GroupDocs.Conversion.FileTypes;
29+
using GroupDocs.Conversion.Options.Convert;
30+
using GroupDocs.Conversion.Options.Load;
31+
32+
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new FinanceLoadOptions
33+
{
34+
Format = FinanceFileType.Xbrl
35+
};
36+
37+
using (Converter converter = new Converter("financial-report.xbrl", getLoadOptions))
38+
{
39+
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
40+
converter.Convert("financial-report.xlsx", options);
41+
}
42+
```
43+
44+
Before v24.10:
45+
46+
```csharp
47+
using GroupDocs.Conversion;
48+
using GroupDocs.Conversion.FileTypes;
49+
using GroupDocs.Conversion.Options.Convert;
50+
using GroupDocs.Conversion.Options.Load;
51+
52+
Func<LoadOptions> getLoadOptions = () => new FinanceLoadOptions
53+
{
54+
Format = FinanceFileType.Xbrl
55+
};
56+
57+
using (Converter converter = new Converter("financial-report.xbrl", getLoadOptions))
58+
{
59+
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
60+
converter.Convert("financial-report.xlsx", options);
61+
}
62+
```
63+
64+
## Load iXBRL document
65+
66+
The following code snippet shows how to load an iXBRL (inline XBRL) document:
67+
68+
With v24.10 and later:
69+
70+
```csharp
71+
using GroupDocs.Conversion;
72+
using GroupDocs.Conversion.FileTypes;
73+
using GroupDocs.Conversion.Options.Convert;
74+
using GroupDocs.Conversion.Options.Load;
75+
76+
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new FinanceLoadOptions
77+
{
78+
Format = FinanceFileType.IXbrl
79+
};
80+
81+
using (Converter converter = new Converter("financial-statement.ixbrl", getLoadOptions))
82+
{
83+
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
84+
converter.Convert("financial-statement.xlsx", options);
85+
}
86+
```
87+
88+
Before v24.10:
89+
90+
```csharp
91+
using GroupDocs.Conversion;
92+
using GroupDocs.Conversion.FileTypes;
93+
using GroupDocs.Conversion.Options.Convert;
94+
using GroupDocs.Conversion.Options.Load;
95+
96+
Func<LoadOptions> getLoadOptions = () => new FinanceLoadOptions
97+
{
98+
Format = FinanceFileType.IXbrl
99+
};
100+
101+
using (Converter converter = new Converter("financial-statement.ixbrl", getLoadOptions))
102+
{
103+
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
104+
converter.Convert("financial-statement.xlsx", options);
105+
}
106+
```
107+
108+
## Convert finance document to CSV
109+
110+
The following code snippet shows how to load an XBRL document and convert it to CSV format:
111+
112+
With v24.10 and later:
113+
114+
```csharp
115+
using GroupDocs.Conversion;
116+
using GroupDocs.Conversion.FileTypes;
117+
using GroupDocs.Conversion.Options.Convert;
118+
using GroupDocs.Conversion.Options.Load;
119+
120+
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new FinanceLoadOptions
121+
{
122+
Format = FinanceFileType.Xbrl
123+
};
124+
125+
using (Converter converter = new Converter("quarterly-report.xbrl", getLoadOptions))
126+
{
127+
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions
128+
{
129+
Format = SpreadsheetFileType.Csv
130+
};
131+
converter.Convert("quarterly-report.csv", options);
132+
}
133+
```
134+
135+
Before v24.10:
136+
137+
```csharp
138+
using GroupDocs.Conversion;
139+
using GroupDocs.Conversion.FileTypes;
140+
using GroupDocs.Conversion.Options.Convert;
141+
using GroupDocs.Conversion.Options.Load;
142+
143+
Func<LoadOptions> getLoadOptions = () => new FinanceLoadOptions
144+
{
145+
Format = FinanceFileType.Xbrl
146+
};
147+
148+
using (Converter converter = new Converter("quarterly-report.xbrl", getLoadOptions))
149+
{
150+
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions
151+
{
152+
Format = SpreadsheetFileType.Csv
153+
};
154+
converter.Convert("quarterly-report.csv", options);
155+
}
156+
```
157+
158+
## Convert between finance formats
159+
160+
The following code snippet shows how to convert from iXBRL to XBRL:
161+
162+
With v24.10 and later:
163+
164+
```csharp
165+
using GroupDocs.Conversion;
166+
using GroupDocs.Conversion.FileTypes;
167+
using GroupDocs.Conversion.Options.Convert;
168+
using GroupDocs.Conversion.Options.Load;
169+
170+
Func<LoadContext, LoadOptions> getLoadOptions = loadContext => new FinanceLoadOptions
171+
{
172+
Format = FinanceFileType.IXbrl
173+
};
174+
175+
using (Converter converter = new Converter("annual-report.ixbrl", getLoadOptions))
176+
{
177+
FinanceConvertOptions options = new FinanceConvertOptions
178+
{
179+
Format = FinanceFileType.Xbrl
180+
};
181+
converter.Convert("annual-report.xbrl", options);
182+
}
183+
```
184+
185+
Before v24.10:
186+
187+
```csharp
188+
using GroupDocs.Conversion;
189+
using GroupDocs.Conversion.FileTypes;
190+
using GroupDocs.Conversion.Options.Convert;
191+
using GroupDocs.Conversion.Options.Load;
192+
193+
Func<LoadOptions> getLoadOptions = () => new FinanceLoadOptions
194+
{
195+
Format = FinanceFileType.IXbrl
196+
};
197+
198+
using (Converter converter = new Converter("annual-report.ixbrl", getLoadOptions))
199+
{
200+
FinanceConvertOptions options = new FinanceConvertOptions
201+
{
202+
Format = FinanceFileType.Xbrl
203+
};
204+
converter.Convert("annual-report.xbrl", options);
205+
}
206+
```

0 commit comments

Comments
 (0)