FactTable export with Korean

73 views
Skip to first unread message

Lee

unread,
Jan 9, 2024, 5:24:24 AMJan 9
to Arelle-users
Hello,

I am trying to copy the FactTable using Arelle and paste it into Excel. In this case, the Korean Language is broken and I would like to inquire if there is a solution. Please confirm.

Thanks,
Seung

Bhavana Prasad

unread,
Jan 24, 2024, 9:11:37 AMJan 24
to Arelle-users
You could directly export the fact table into Excel. This will avoid the copy/paste and there by any character code changes. 

Best
Prasad

Bill Palmer

unread,
Feb 5, 2024, 1:19:12 AMFeb 5
to Arelle-users
From the Fact Table panel, select File-SaveAs menu option. Change from .xslx  to  .html  file type. Open the saved HTML in your web browser. The displayed Fact List can be selected as Ctrl-a and Ctrl-c for same effect as Arelle Python GUI .... but browser should capture accurate Korean character encoding. 

The same procedure for the default SaveAS EXCEL .xlsx is not as straight-forward because of cell size limits causing overflow, etc.

 I do not read Korean....I have no test sample with Korean. ..... So, I wonder... does this HTML display help solve your issues?

Regards,
Bill Palmer

Bill Palmer

unread,
Feb 27, 2024, 12:58:14 PMFeb 27
to Arelle-users
I previously answered the following suggestion:
>From the Fact Table panel, select File-SaveAs menu option. Change from .xslx  to  .html  file type.<

This is only a partial solution. Prasad suggested loading direct to excel, which I did not properly understand to be the Save-As default as an .xslx file. Writing your own export program would be problematic. The tricky part of importing information into excel is that values and unicode will be distorted unless you use a sophisticated tool like arelle's save-as function... to preserve formatted numbers, dates, etc.  Even more problematic with excel is the handling of long text. The save-as from arelle and the copy-paste buffer methods both have to handle text longer than the excel-cell-maximum.... and they each do it differently. The arelle save-as will chop off and lose the excess escaped HTML code(which is desirable, anyways, when you are not caring about these long strings for excel-type analysis.). The save-as .html will successfully export the full text beyond the cell capacity of excel. The third option is the problematic copy-paste routine of the original post.... and,  right-click-[Copy-to-Clipboard]-[Table](manually-paste-to-excel-method), results in breaking too-long text strings as spill-over to new rows in the first column... while, at the same time, this paste method distorts many date and fraction values, and also does not capture unicode cleanly(as this original post reveals about Korean text). The distortion of numeric values can be worked-around by first pasting to a text editor (like VSCode) as a TSV file and changing the last TSV value column to TEXT (by prefixing all values with non-numeric characters), then selectively removing your non-numeric-prefixes inside excel(surprisingly, cells going back-to-numeric  from being text , now edited to be numbers, will adopt native excel numeric formats with commas, etc.).

There are other options beyond the scope of this review of arelle support, which alone is fairly sophisticated and useful to understand.

An important purpose of the Fact Table panel is to understand labels from the DTS label linkbases, and which can significantly vary from underlying xml-qnames in the XML instance file (or inlineXBRL name= attributes).. It could be as in Korean, here discussed, or just a formal standard label is needed from the label linkbases of the DTS. Also nicely formatted numeric values, etc., are presented to be reviewed for human-reader consumption.

Regards,
Bill Palmer.
Reply all
Reply to author
Forward
0 new messages