Learn how to Convert XBRL to HTML in Python
Last active
May 8, 2024 01:51
-
-
Save aspose-com-gists/7ed55369a45586ede9ddcd408ba204ab to your computer and use it in GitHub Desktop.
Convert XBRL to HTML in Python
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
# This code sample demonstrates how to convert an XBRL file to a PDF document. | |
import io | |
import aspose.cells | |
from aspose.cells import Workbook, FileFormatType, SaveFormat as CellsSaveFormat | |
from aspose.finance.xbrl import XbrlDocument, SaveOptions, SaveFormat as XbrlSaveFormat | |
# Load XBRL document | |
document = XbrlDocument("sample.xbrl") | |
# Set save options | |
saveOptions = SaveOptions() | |
saveOptions.save_format = XbrlSaveFormat.XLSX | |
# Save XBRL as XLSX | |
document.save("sample_out.xlsx", saveOptions) | |
# Open an Excel file | |
workbook = Workbook("sample_out.xlsx") | |
# Save the document in HTML format | |
workbook.save("output.html", CellsSaveFormat.HTML) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment