You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/09/14 02:51:31 UTC
[incubator-linkis] branch dev-1.3.1 updated: fix excel export:decimalType can not be unrecognized and calculated (#3352)
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch dev-1.3.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git
The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
new 8124a82c5 fix excel export:decimalType can not be unrecognized and calculated (#3352)
8124a82c5 is described below
commit 8124a82c5cf0fb87e4797adb522585cd12cc4418
Author: Casion <ca...@gmail.com>
AuthorDate: Wed Sep 14 10:51:26 2022 +0800
fix excel export:decimalType can not be unrecognized and calculated (#3352)
---
.../scala/org/apache/linkis/storage/excel/StorageExcelWriter.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linkis-commons/linkis-storage/src/main/scala/org/apache/linkis/storage/excel/StorageExcelWriter.scala b/linkis-commons/linkis-storage/src/main/scala/org/apache/linkis/storage/excel/StorageExcelWriter.scala
index 5f20f121e..2aff4af61 100644
--- a/linkis-commons/linkis-storage/src/main/scala/org/apache/linkis/storage/excel/StorageExcelWriter.scala
+++ b/linkis-commons/linkis-storage/src/main/scala/org/apache/linkis/storage/excel/StorageExcelWriter.scala
@@ -168,8 +168,8 @@ class StorageExcelWriter(
case VarcharType => cell.setCellValue(DataType.valueToString(elem))
case DateType => cell.setCellValue(getDate(elem))
case TimestampType => cell.setCellValue(getDate(elem))
- case DecimalType => cell.setCellValue(DataType.valueToString(elem))
- case BigDecimalType => cell.setCellValue(DataType.valueToString(elem))
+ case DecimalType => cell.setCellValue(DataType.valueToString(elem).toDouble)
+ case BigDecimalType => cell.setCellValue(DataType.valueToString(elem).toDouble)
case _ =>
val value = DataType.valueToString(elem)
cell.setCellValue(value)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org