jxl.write.NumberFormat nf = new jxl.write.NumberFormat("#,##0.00"); // 设置数字格式
jxl.write.WritableCellFormat wcfN = new jxl.write.WritableCellFormat(nf); // 设置格式
// 设置标题行
ws.addCell(new Label(0, 0, "姓名", wcf));
ws.addCell(new Label(1, 0, "用户电话", wcf));
ws.addCell(new Label(2, 0, "支付金额", wcf));
ws.addCell(new Label(3, 0, "支付类型", wcf));
ws.addCell(new Label(4, 0, "订单号", wcf));
ws.addCell(new Label(5, 0, "押金状态", wcf));
ws.addCell(new Label(6, 0, "支付时间", wcf));
ws.addCell(new Label(6, 0, "备注", wcf));
ws.addCell(new Label(0, i + 1, activeAccountRecord.getName(), wcf));
ws.addCell(new Label(1, i + 1, activeAccountRecord.getMobile(), wcf));
double actualpaymentcost = activeAccountRecord.getAccount()==null?0.00:activeAccountRecord.getAccount();
jxl.write.Number labelActualpaymentcost = new jxl.write.Number(2, i + 1, actualpaymentcost, wcfN); // 格式化数值
ws.addCell(labelActualpaymentcost);