colinwjd commented on code in PR #321:
URL: https://github.com/apache/poi/pull/321#discussion_r846559707


##########
poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java:
##########
@@ -950,7 +950,7 @@ private String getFormattedNumberString(Cell cell, 
ConditionalFormattingEvaluato
         if (numberFormat == null) {
             return String.valueOf(d);
         }
-        String formatted = numberFormat.format(d);
+        String formatted = numberFormat.format(new 
BigDecimal(String.valueOf(d)));

Review Comment:
   The test file is as follows
   
[test-github-321.xlsx](https://github.com/apache/poi/files/8456025/test-github-321.xlsx)
   
   The value uses a one-decimal format, in which case the problem I describe 
occurs.
   <img width="898" alt="image" 
src="https://user-images.githubusercontent.com/7942918/162551906-9ffb13c3-2d27-4146-9a6f-d67ffc150995.png";>
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to