我在用jxl包读取Excel中时,当有些数据字段位数比较多的时候,就会自动保留了。
比如:Excel中的数据为115.013958333333,而通过程序读取到的值是:115.014.相应的代码是:
for(int I=0;I<row_num;I++){
Cell excel_cell[]=sheet.getRow(I);
String Llongitude=excel_cell[9].getContents();
String Llatitude=excel_cell[10].getContents();
System.out.println(Llongitude);
System.out.println(Llatitude);
}请问这个问题到底是怎么解决?多谢。
比如:Excel中的数据为115.013958333333,而通过程序读取到的值是:115.014.相应的代码是:
for(int I=0;I<row_num;I++){
Cell excel_cell[]=sheet.getRow(I);
String Llongitude=excel_cell[9].getContents();
String Llatitude=excel_cell[10].getContents();
System.out.println(Llongitude);
System.out.println(Llatitude);
}请问这个问题到底是怎么解决?多谢。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货