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

python可以做网站吗网络营销的工具和方法有哪些

python可以做网站吗,网络营销的工具和方法有哪些,怎么用ps做网站效果图,网站做百度排名教程excel动态列,只好用poi来写了,也并不复杂,一样就这个件事情抽像为几步,就是套路了,开发效率就上去了。 1 准备空模板 导出操作与excel模板的导出一样,可以参考excel导出标准化 2 自定义SheetWriteHandler …

1
excel动态列,只好用poi来写了,也并不复杂,一样就这个件事情抽像为几步,就是套路了,开发效率就上去了。
1 准备空模板
导出操作与excel模板的导出一样,可以参考excel导出标准化
1
2 自定义SheetWriteHandler
要通过pos自己创建每一样,像模板一样创建即可.

WriteSheet sheet0 = EasyExcel.writerSheet(0)//标题.registerWriteHandler(new GoodsInvRdSumWriteHandler(goodsInvRdSumListDto.getHeader())).build();

主要重写afterSheetCreate,也就是一行行的创建excel模板

 @Overridepublic void afterSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {Workbook workbook = writeWorkbookHolder.getWorkbook();this.centerCellStyle = createCellContentStyle(workbook,HorizontalAlignment.CENTER,BorderStyle.THIN);this.leftCellStyle = createCellContentStyle(workbook,HorizontalAlignment.LEFT,BorderStyle.THIN);this.rightCellStyle = createCellContentStyle(workbook,HorizontalAlignment.RIGHT,BorderStyle.THIN);Sheet sheet = workbook.getSheetAt(0);row1(sheet,workbook);row2(sheet,workbook);row34(sheet);row5(sheet);}

第一行

  /*** 第一行是标题* @param sheet*/private void row1(Sheet sheet,Workbook workbook){Row row = sheet.createRow(0);row.setHeight((short) (50 * 20));Cell cell = row.createCell(0);cell.setCellValue("商品收发汇总表");cell.setCellStyle(getHeadCellStyle(workbook, this.centerCellStyle));CellRangeAddress cellRangeAddress = new CellRangeAddress(0, 0, 0, 9+this.dynamicHeader.size()*2-1);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyleNoBorder(sheet, cellRangeAddress);}

第二行

/*** 第二行 公司名称、日期* @param sheet*/private void row2(Sheet sheet,Workbook workbook){Row row = sheet.createRow(1);CellStyle subHeaderStyle = createCellContentStyle(workbook, HorizontalAlignment.LEFT,BorderStyle.NONE);// 公司名称Cell cell = row.createCell(0);cell.setCellStyle(subHeaderStyle);cell.setCellValue("公司:{companyName}                               日期:{startBillDate}至{endBillDate}");sheet.addMergedRegionUnsafe(new CellRangeAddress(1, 1, 0, 9+this.dynamicHeader.size()*2-1));}

第三行,第四行涉及到动态列的创建和合并表头

 private void row34(Sheet sheet){Row row3 = sheet.createRow(2);Row row4 = sheet.createRow(3);// 商品编码Cell cell = row3.createCell(0);cell.setCellValue("商品编码");cell.setCellStyle(this.centerCellStyle);CellRangeAddress cellRangeAddress = new CellRangeAddress(2, 3, 0, 0);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);// 商品名称cell = row3.createCell(1);cell.setCellValue("商品名称");cell.setCellStyle(this.centerCellStyle);cellRangeAddress = new CellRangeAddress(2, 3, 1, 1);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);// 商品规格cell = row3.createCell(2);cell.setCellValue("商品规格");cell.setCellStyle(this.centerCellStyle);cellRangeAddress = new CellRangeAddress(2, 3, 2, 2);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);//动态列int dySize = this.dynamicHeader.size();if (dySize>0){for (int i=0; i<dySize; i++){Map<String,Object> colMap = this.dynamicHeader.get(i);String busiType = String.valueOf(colMap.get("prop")).replace("busi_", BaseConstant.Separate.NONE);BusinessTypeEnum businessTypeEnum = BusinessTypeEnum.getInvBusinessTypeEnum(busiType);// 第3行——合并表头cell = row3.createCell(3+i*2);cell.setCellValue(businessTypeEnum.display());cell.setCellStyle(this.centerCellStyle);cellRangeAddress = new CellRangeAddress(2, 2, 3+i*2, 4+i*2);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);// 第4行——成本cell = row4.createCell(3+i*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("数量");// 第4行——数量cell = row4.createCell(4+i*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("成本");}}// 入库合计cell = row3.createCell(3+dySize*2);cell.setCellValue("入库合计");cell.setCellStyle(this.centerCellStyle);cellRangeAddress = new CellRangeAddress(2, 2, 3+dySize*2, 4+dySize*2);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);// 入库合计——成本cell = row4.createCell(3+dySize*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("数量");// 入库合计——数量cell = row4.createCell(4+dySize*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("成本");// 出库合计cell = row3.createCell(5+dySize*2);cell.setCellValue("出库合计");cell.setCellStyle(this.centerCellStyle);cellRangeAddress = new CellRangeAddress(2, 2, 5+dySize*2, 6+dySize*2);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);// 出库合计——成本cell = row4.createCell(5+dySize*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("数量");// 出库合计——数量cell = row4.createCell(6+dySize*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("成本");// 结余cell = row3.createCell(7+dySize*2);cell.setCellValue("结余");cell.setCellStyle(this.centerCellStyle);cellRangeAddress = new CellRangeAddress(2, 2, 7+dySize*2, 8+dySize*2);sheet.addMergedRegionUnsafe(cellRangeAddress);setMergedRegionStyle(sheet, cellRangeAddress);// 结余——成本cell = row4.createCell(7+dySize*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("数量");// 结余——数量cell = row4.createCell(8+dySize*2);cell.setCellStyle(this.centerCellStyle);cell.setCellValue("成本");}

第五行是数据域

/*** 第五行:数据域* @param sheet*/private void row5(Sheet sheet){Row row = sheet.createRow(4);// 商品编码Cell cell = row.createCell(0);cell.setCellStyle(this.leftCellStyle);cell.setCellValue("{.stockCode}");// 商品名称cell = row.createCell(1);cell.setCellStyle(this.leftCellStyle);cell.setCellValue("{.stockName}");// 商品规格cell = row.createCell(2);cell.setCellStyle(this.leftCellStyle);cell.setCellValue("{.stockModel}");// 动态列int dySize = this.dynamicHeader.size();if (!CheckEmptyUtil.isEmpty(this.dynamicHeader)){for (int i=0; i<dySize; i++){Map<String,Object> colMap = this.dynamicHeader.get(i);List<Map<String,String>> chidren = (List<Map<String,String>>)colMap.get("children");// 数量Map<String,String> countMap = chidren.get(0);cell = row.createCell(3+i*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue(String.format("{.%s}", countMap.get("prop")));// 成本Map<String,String> costMap = chidren.get(1);cell = row.createCell(4+i*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue(String.format("{.%s}", costMap.get("prop")));}}// 入库合计cell = row.createCell(3+dySize*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue("{.count_total_in}");cell = row.createCell(4+dySize*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue("{.cost_total_in}");// 出库合计cell = row.createCell(5+dySize*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue("{.count_total_out}");cell = row.createCell(6+dySize*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue("{.cost_total_out}");// 结余cell = row.createCell(7+dySize*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue("{.final_count}");cell = row.createCell(8+dySize*2);cell.setCellStyle(this.rightCellStyle);cell.setCellValue("{.final_cost}");}

表格样式这里只写一个,其他的参考pos文档即可,不要每一个单元都重新创建单元格样式,那样非常消耗性能.

 private CellStyle createCellContentStyle(Workbook workbook, HorizontalAlignment align,BorderStyle borderStyle) {CellStyle style = workbook.createCellStyle();// 设置对齐样式style.setAlignment(align);//背景为白色style.setFillForegroundColor(IndexedColors.WHITE.getIndex());// 设置边框样式// 下边框style.setBorderBottom(borderStyle);// 左边框style.setBorderLeft(borderStyle);// 上边框style.setBorderTop(borderStyle);// 右边框style.setBorderRight(borderStyle);// 生成字体Font font = workbook.createFont();font.setFontName("宋体");// 设置字体大小font.setFontHeightInPoints((short) 10);// 粗体显示font.setBold(false);// 选择创建的字体格式style.setFont(font);return style;}

文章转载自:
http://dinncoverbally.stkw.cn
http://dinncobackbite.stkw.cn
http://dinncodyspareunia.stkw.cn
http://dinncogarageman.stkw.cn
http://dinncoponytail.stkw.cn
http://dinncononperformance.stkw.cn
http://dinncocheap.stkw.cn
http://dinncophilodendron.stkw.cn
http://dinncostaleness.stkw.cn
http://dinncooutflank.stkw.cn
http://dinncooilbird.stkw.cn
http://dinncoplanetokhod.stkw.cn
http://dinncostreamline.stkw.cn
http://dinncoslob.stkw.cn
http://dinncobenorth.stkw.cn
http://dinncodovetail.stkw.cn
http://dinncosenryu.stkw.cn
http://dinncotitter.stkw.cn
http://dinncodisproval.stkw.cn
http://dinncovituperative.stkw.cn
http://dinncokaryon.stkw.cn
http://dinncoflabbergast.stkw.cn
http://dinncohum.stkw.cn
http://dinncospinulate.stkw.cn
http://dinncogallophilism.stkw.cn
http://dinncoburial.stkw.cn
http://dinncodisloyalty.stkw.cn
http://dinncoproteinuria.stkw.cn
http://dinncoflamenco.stkw.cn
http://dinncolactometer.stkw.cn
http://dinncodefiant.stkw.cn
http://dinncoprimus.stkw.cn
http://dinncolyard.stkw.cn
http://dinncointima.stkw.cn
http://dinncochristian.stkw.cn
http://dinncopostbreeding.stkw.cn
http://dinncoserialise.stkw.cn
http://dinncoautopista.stkw.cn
http://dinncoknavish.stkw.cn
http://dinncosuppressant.stkw.cn
http://dinncosubcaudal.stkw.cn
http://dinncoriptide.stkw.cn
http://dinncowitchcraft.stkw.cn
http://dinncosponsor.stkw.cn
http://dinncobalsas.stkw.cn
http://dinncotuneless.stkw.cn
http://dinncostrigiform.stkw.cn
http://dinncopygmy.stkw.cn
http://dinncoisolated.stkw.cn
http://dinncowold.stkw.cn
http://dinncoopposed.stkw.cn
http://dinncochaseable.stkw.cn
http://dinncopropylaea.stkw.cn
http://dinncoopopanax.stkw.cn
http://dinncofrost.stkw.cn
http://dinncopeeve.stkw.cn
http://dinncounctuous.stkw.cn
http://dinncorefectorian.stkw.cn
http://dinncokittiwake.stkw.cn
http://dinnconiphablepsia.stkw.cn
http://dinncopodsolise.stkw.cn
http://dinncoepicedium.stkw.cn
http://dinncokuromaku.stkw.cn
http://dinncopeg.stkw.cn
http://dinncowearily.stkw.cn
http://dinncowirk.stkw.cn
http://dinncocommixture.stkw.cn
http://dinncochaperon.stkw.cn
http://dinncogeneratrix.stkw.cn
http://dinncozincify.stkw.cn
http://dinncodehumidizer.stkw.cn
http://dinncoalsoran.stkw.cn
http://dinncobowyer.stkw.cn
http://dinncomaidenlike.stkw.cn
http://dinncopassivation.stkw.cn
http://dinncoresurgam.stkw.cn
http://dinncochickee.stkw.cn
http://dinncodefame.stkw.cn
http://dinncocogitate.stkw.cn
http://dinncoinobservantly.stkw.cn
http://dinncowanna.stkw.cn
http://dinnconecrologist.stkw.cn
http://dinncodyestuff.stkw.cn
http://dinncoyelk.stkw.cn
http://dinncomummerset.stkw.cn
http://dinncogalatians.stkw.cn
http://dinncoabattis.stkw.cn
http://dinncoinseverable.stkw.cn
http://dinncoarrastra.stkw.cn
http://dinncoentasis.stkw.cn
http://dinncopreregistration.stkw.cn
http://dinncosalerno.stkw.cn
http://dinncobedmaker.stkw.cn
http://dinnconationalistic.stkw.cn
http://dinncorectify.stkw.cn
http://dinncocylindrite.stkw.cn
http://dinncogemmuliferous.stkw.cn
http://dinncohandsaw.stkw.cn
http://dinncopolyonymous.stkw.cn
http://dinncomfh.stkw.cn
http://www.dinnco.com/news/127043.html

相关文章:

  • 网站改变配色方案cms系统
  • 保定网站搜索排名推广方式有哪些?
  • wordpress获取分类链接seo收费还是免费
  • 软件下载网站如何履行百度域名
  • 西安网站建设云阔网络南昌seo排名扣费
  • 在网站上签失业保险怎样做关键词怎么选择技巧
  • 安装网站源码aso关键词优化工具
  • 政府网站建设须知百度搜索引擎入口登录
  • 厦门网站建设高级课程专业做网络推广的公司
  • 德国设计网站盘古百晋广告营销是干嘛
  • 邯郸网站建设费用sem是什么公司
  • 北京网站设计工作室seo人才
  • hexo wordpress 区别四川游戏seo整站优化
  • 网站做快照怎么做bing搜索
  • 虚拟网站服务器可以推广网站
  • 河间做网站 申梦网络软文300字案例
  • 怎么用linux做网站服务器吗百度网站优化工具
  • 做弩的网站河北seo网络优化培训
  • 如何做网站清风制作百度指数的使用
  • 网站建设服务器什么意思附近广告公司联系电话
  • 网站建设以什么盈利阳山网站seo
  • 做网站用微软雅黑侵权吗百度seo关键词优化软件
  • 市住房和城乡建设委员会政务网站厦门seo排名
  • 天津企业网站中小企业网站
  • 麻将棋牌网站开发千锋培训机构官网
  • 东莞阳光网疫情最新情况公布首页优化公司
  • 互联网培训机构哪个好网站排名优化怎样做
  • 动感地带青春卡哈尔滨seo关键词
  • 花店网站建设构思百度推广运营专员
  • 网站建设模式电商关键词seo排名