eas之关于数字精度的设置
private void changeshowData(int firstRow,int lastRow)throws EASBizException,BOSException{
	for(int i=firstRow;i<=lastRow;i++){
		IRow row=tblMain.getRow(i);
		//根据币别设置精度
		ICell cell=row.getCell("columnName");//获取到指定单元格对象
		//假定精度为2
		int percision=2;
		try{
			if(cell!=null && cell.getValue()!=null){
				percision=Integer.parseInt(cell.getValue().toString());
			}
		}catch(Exception e){
			percision=2;
		}
		//当该行的币别精度不等于原币精度时才更改精度
		if(percision!=basePercision){
			for(int j=0;j<rowcount;j++){
				tblMain.getColum("billDate").getStyleAttributes().setNumberFormat("%{yyyy-MM-dd}t");
				tblMain.getColum("debitFor").getStyleAttributes().setNumberFormat("%r{#,##0.00}f"");
				tblMain.getColumn("debitFor").getStyleAttributes().setHorizontalAlign(HorizontalAlignment.RIGHT);
				tblMain.getColumn("endBalanceFor").getStyleAttributes().setNumberFormat("%r{#,##0.00}f");
				tblMain.getColumn("endBalanceFor").getStyleAttributes().setHorizontalAlign(HorizontalAlignment.RIGHT);
			}
		}
	}
}
 
                    
                
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号