我在一个Jsp页面中用excel显示一组数据   可以数字是以科学技术法显示的  
请问如何解决 

解决方案 »

  1.   

    public   static   String   SicenToComm(double   value)   {
    String   retValue   =   null;
    DecimalFormat   df   =   new   DecimalFormat();
    df.setMinimumFractionDigits(2);
    df.setMaximumFractionDigits(2);
    retValue   =   df.format(value);
    retValue   =   retValue.replaceAll( ", ",   " ");
    return   retValue;
    }
    输入一个double类型的数,返回一个已经解决科学技术法的字符串
    如果您还是需要把这个字符串再转换为double类型的数就这样Double.parseDouble( "本字符串 ")
    如果仅仅是在jsp页面显示就不需要了   就这样
      

  2.   

    excel 会自作多情的显示科学记数法, 但是你可以对单元格做格式化限定就可以了.
    我不知道在java中怎么写, 带delphi中是这样做的:
    ExcelWorkSheet1.Cells.Item[i,j].NumberFormatLocal:='@';
    就是说单元格有个属性叫做NumberFormatLocal, 让它的值为@ 就可以了.