Java converts scientific enumeration data into instances of strings

  • 2020-05-24 05:37:31
  • OfStack

Some projects may involve importing data from Excel, but if the cell type in Excel is numeric, but the content data is too long (such as bank account number), the import will be read as scientific counting method by default, which can be easily solved with the following code.

BigDecimal bd = new BigDecimal("3.40256010353E11");
System.out.println(bd.toPlainString());


Related articles: