Spreadsheet applications (Excel, Calc) internal precision truncates large numbers.

Spreadsheet applications (Excel, Calc) internal precision truncates large numbers.

book

Article ID: KB0093759

calendar_today

Updated On:

Products Versions
TIBCO BPM Enterprise (formerly TIBCO ActiveMatrix BPM) -
Not Applicable -

Description

Description:
Microsoft Excel, OpenOffice Calc, LibreOffice Calc all truncate large numbers from database exports. This issue will affect any table export where the actual values have more than 15 decimal digits. Various BPM database tables use NUMBER(19,0) column types. When the actual data values are very large, importing data into a spreadsheet for inspection/analysis results in a loss of precision due to values being truncated to fit the spreadsheet's internal data model. This can lead to inaccurate results when analyzing data. This issue was identified when analyzing message Correlation hashes in PVM_MSG_WAITING_RECEIVER.EVAL_CORRELATION_ID, but many BPM tables feature NUMBER(19,0)-typed columns in the BPM DDL.
Symptoms:
Large-value numbers in the data will be displayed with trailing zeros. Comparing values shown in spreadsheet with those in raw CSV export will reveal discrepancies.
Cause:
Excel / Calc spreadsheet applications use limited precision data type for numeric values. When database export is in XLS format, the original values cannot be seen. It is unknown if they are truncated on export or on import, only that the precision is lost by the time the data is seen. When exported as CSV, the column can be forced as Text when opening in spreadsheet applications, allowing accurate analysis/correlation.


Resolution

1). Always request/produce database exports in CSV format, not XLS/XLSX.
2). When importing/pasting the data into a spreadsheet, be sure to set the long-value column(s) to Text.

Note: It may be necessary to exclude BLOB-type columns from the exported data. If those are needed, produce a second export in the appropriate format.

Issue/Introduction

Spreadsheet applications (Excel, Calc) internal precision truncates large numbers.

Additional Information

https://en.wikipedia.org/wiki/Numeric_precision_in_Microsoft_Excel
https://ask.libreoffice.org/en/question/6546/large-numbers-truncated-in-calc/