Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created February 16, 2021 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/eee41e11a807b5b825656387914ecf75 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/eee41e11a807b5b825656387914ecf75 to your computer and use it in GitHub Desktop.
Convert XBRL to XLSX Excel Worksheet or iXBRL Programmatically in C#
// Load input XBRL file as XML format
XbrlDocument document = new XbrlDocument(sourceDir + @"IdScopeContextPeriodStartAfterEnd.xml");
// Set SaveOptions for output format
SaveOptions saveOptions = new SaveOptions();
saveOptions.SaveFormat = SaveFormat.IXBRL;
// Convert XBRL file to iXBRL file format
document.Save(outputDir + @"ConvertXbrlToIXbrl_out.ixbrl", saveOptions);
// Load input XBRL file
XbrlDocument document = new XbrlDocument(sourceDir + @"IdScopeContextPeriodStartAfterEnd.xml");
// Set SaveOptions for output file
SaveOptions saveOptions = new SaveOptions();
saveOptions.SaveFormat = SaveFormat.XLSX;
// Convert XBRL file to XLSX Excel Worksheet format
document.Save(outputDir + @"ConvertXbrlToXlsx_out.xlsx", saveOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment