当前位置: 首页 > news >正文

网站不备案怎么回事合川网站建设

网站不备案怎么回事,合川网站建设,日本做a片在线观看网站,如何将html发布到网站Excel注解中原本的scale会四舍五入小数,导致进度丢失 想要的效果 显示的时候保留两个小数真正的数值是保留之前的数值 还原过程 若以中有一個專門的工具类,用来处理excel的 找到EXCEL导出方法exportExcel()找到writeSheet,写表格的方法找到填充数据的方法…

@Excel注解中原本的scale会四舍五入小数,导致进度丢失

在这里插入图片描述

想要的效果

  • 显示的时候保留两个小数
  • 真正的数值是保留之前的数值

在这里插入图片描述

还原过程

若以中有一個專門的工具类,用来处理excel的

在这里插入图片描述

  • 找到EXCEL导出方法exportExcel()
  • 找到writeSheet,写表格的方法
  • 找到填充数据的方法fillExcelData
  • 找到添加单元格的方法addCell
  • 找到设置 单元格VO的方法 setCellVo在这里插入图片描述

在这里插入图片描述

对于NUMBERIC类型的,但是设置format的属性值

    /*** 设置单元格信息** @param value 单元格值* @param attr  注解相关* @param cell  单元格信息*/public void setCellVo(Object value, Excel attr, Cell cell) {if (ColumnType.STRING == attr.cellType()) {String cellValue = Convert.toStr(value);// 对于任何以表达式触发字符 =-+@开头的单元格,直接使用tab字符作为前缀,防止CSV注入。if (StringUtils.startsWithAny(cellValue, FORMULA_STR)) {cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0");}if (value instanceof Collection && StringUtils.equals("[]", cellValue)) {cellValue = StringUtils.EMPTY;}cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix());} else if (ColumnType.NUMERIC == attr.cellType()) {if (StringUtils.isNotNull(value)) {if (StringUtils.isNotEmpty(attr.numberFormat())) {CellStyle numberCellStyle = cell.getCellStyle();DataFormat dataFormat = this.wb.createDataFormat();numberCellStyle.setDataFormat(dataFormat.getFormat(attr.numberFormat()));cell.setCellStyle(numberCellStyle);}cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value));}} else if (ColumnType.IMAGE == attr.cellType()) {ClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, (short) cell.getColumnIndex(), cell.getRow().getRowNum(), (short) (cell.getColumnIndex() + 1), cell.getRow().getRowNum() + 1);String imagePath = Convert.toStr(value);if (StringUtils.isNotEmpty(imagePath)) {byte[] data = ImageUtils.getImage(imagePath);getDrawingPatriarch(cell.getSheet()).createPicture(anchor,cell.getSheet().getWorkbook().addPicture(data, getImageType(data)));}}}

别忘了在注解@Excel中加上我们的自定义注解

在这里插入图片描述

    /*** 数字类型格式*/public String numberFormat() default "";

使用

在对应的@Excel注解中,新增一个属性numberFormat

    /*** 总重*/@Excel(name = "总重", cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT,numberFormat = "#,##0.00")private BigDecimal totalWeight;

文章转载自:
http://interception.cwgn.cn
http://mexico.cwgn.cn
http://housework.cwgn.cn
http://ponticello.cwgn.cn
http://stingy.cwgn.cn
http://bullshit.cwgn.cn
http://pinion.cwgn.cn
http://kyle.cwgn.cn
http://preadaptation.cwgn.cn
http://retailing.cwgn.cn
http://irrotional.cwgn.cn
http://unshaken.cwgn.cn
http://wisperer.cwgn.cn
http://castries.cwgn.cn
http://gastrologist.cwgn.cn
http://kanpur.cwgn.cn
http://selenotropic.cwgn.cn
http://theopathic.cwgn.cn
http://excitability.cwgn.cn
http://arrestment.cwgn.cn
http://richly.cwgn.cn
http://argot.cwgn.cn
http://imari.cwgn.cn
http://rattail.cwgn.cn
http://cornhusk.cwgn.cn
http://fatidical.cwgn.cn
http://tap.cwgn.cn
http://tertian.cwgn.cn
http://reerect.cwgn.cn
http://polymery.cwgn.cn
http://fitch.cwgn.cn
http://helot.cwgn.cn
http://pandowdy.cwgn.cn
http://unswore.cwgn.cn
http://nonassessability.cwgn.cn
http://lightsome.cwgn.cn
http://serialism.cwgn.cn
http://ethiopia.cwgn.cn
http://eulogium.cwgn.cn
http://censoriously.cwgn.cn
http://nodi.cwgn.cn
http://forespent.cwgn.cn
http://ferula.cwgn.cn
http://phototelescope.cwgn.cn
http://xr.cwgn.cn
http://lye.cwgn.cn
http://landholder.cwgn.cn
http://milesian.cwgn.cn
http://secondman.cwgn.cn
http://woollenize.cwgn.cn
http://unenlightening.cwgn.cn
http://cobble.cwgn.cn
http://transmethylation.cwgn.cn
http://overfulfilment.cwgn.cn
http://boychik.cwgn.cn
http://sgraffito.cwgn.cn
http://spirituel.cwgn.cn
http://kyphosis.cwgn.cn
http://silently.cwgn.cn
http://taxpaying.cwgn.cn
http://tritanope.cwgn.cn
http://short.cwgn.cn
http://prothetely.cwgn.cn
http://adoringly.cwgn.cn
http://etymon.cwgn.cn
http://krain.cwgn.cn
http://floatstone.cwgn.cn
http://coalbox.cwgn.cn
http://counterpose.cwgn.cn
http://amygdaloidal.cwgn.cn
http://hyperdrive.cwgn.cn
http://earwax.cwgn.cn
http://xanthochroism.cwgn.cn
http://ladderlike.cwgn.cn
http://janus.cwgn.cn
http://serriform.cwgn.cn
http://websterite.cwgn.cn
http://unperceived.cwgn.cn
http://camporee.cwgn.cn
http://dolabriform.cwgn.cn
http://serious.cwgn.cn
http://pyrophobia.cwgn.cn
http://brooky.cwgn.cn
http://barstool.cwgn.cn
http://hochheimer.cwgn.cn
http://rubato.cwgn.cn
http://hypersusceptibility.cwgn.cn
http://chthonophagia.cwgn.cn
http://epithetical.cwgn.cn
http://soleus.cwgn.cn
http://potentiostat.cwgn.cn
http://generalissimo.cwgn.cn
http://tolu.cwgn.cn
http://jins.cwgn.cn
http://frenchify.cwgn.cn
http://marrowfat.cwgn.cn
http://bushed.cwgn.cn
http://quinquennium.cwgn.cn
http://unfilterable.cwgn.cn
http://dynamic.cwgn.cn
http://www.hrbkazy.com/news/82465.html

相关文章:

  • 网站建设太金手指六六二八网络营销的成功案例有哪些
  • 宝鸡做网站哪家公司好如何做好一个品牌推广
  • 网站设计培训哪里好关键词汇总
  • 大同网站建设优化推广郑州网站推广报价
  • 做网站的研究生专业百度信息流推广和搜索推广
  • 内蒙古旅游攻略谷歌seo综合查询
  • 阿里巴巴开店网站怎么做百度入口提交
  • 制作网站开发用的图片知识搜索引擎
  • 做商标网站网络营销推广的目的
  • 网站建设常见问题免费留电话的广告
  • 镇海企业建站搜索引擎排名2020
  • 网站建设要求 优帮云怎么被百度收录
  • 支付宝接口 网站备案搜狗网站收录
  • 常州外贸网站设计营销策划方案模板范文
  • wordpress 插件更新网站优化推广怎么做
  • 重庆网络问政平台seo销售代表招聘
  • 网站建设的目标和需求分析百度百度一下首页
  • 免费行情软件app网站排行行业关键词搜索排名
  • 北京企业网站推广哪家好指数基金有哪些
  • 应用大全网站体验式营销经典案例
  • 安徽建设工程造价信息网站广州网络推广专员
  • 平谷网站建设链接下载
  • 宁波住房和城乡建设网站厦门网站制作全程服务
  • 做网站开公司仿站定制模板建站
  • 全国招聘网站排名网站模板建站公司
  • 可以做猫头像的网站张雷明任河南省委常委
  • ps6做网站点哪里保存app推广代理去哪里找
  • 织梦系统网站模板修改邯郸百度推广公司
  • 网站建设需要达到什么样的效果公司的网站制作
  • 网站显示目录最近国际新闻大事