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

网站同时做竞价和优化可以吗现在最火的推广平台有哪些

网站同时做竞价和优化可以吗,现在最火的推广平台有哪些,国内网站开发公司,绛帐做网站本文用来记录在安卓中生成Excel文件并保存到本地操作,在网上找了好久,终于找到一个可以用的,虽然代码已经很老的,但亲测可用! 项目地址:https://github.com/wanganan/AndroidExcel 可以下载下来修改直接用…

本文用来记录在安卓中生成Excel文件并保存到本地操作,在网上找了好久,终于找到一个可以用的,虽然代码已经很老的,但亲测可用!

项目地址:https://github.com/wanganan/AndroidExcel

可以下载下来修改直接用,该项目主要是依赖一个叫jxl.jar的包,导到项目中libs文件下加即可。

关键代码:

public class ExcelUtil {//内存地址public static String root = Environment.getExternalStorageDirectory().getPath();public static void writeExcel(Context context, List<Order> exportOrder,String fileName) throws Exception {if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)&&getAvailableStorage()>1000000) {Toast.makeText(context, "SD卡不可用", Toast.LENGTH_LONG).show();return;}String[] title = { "订单", "店名", "电话", "地址" };File file;
//		File dir = new File(context.getExternalFilesDir(null).getPath());File dir = new File(Environment.getExternalStorageDirectory().getAbsolutePath());file = new File(dir, fileName + ".xls");if (!dir.exists()) {dir.mkdirs();}// 创建Excel工作表WritableWorkbook wwb;OutputStream os = new FileOutputStream(file);wwb = Workbook.createWorkbook(os);// 添加第一个工作表并设置第一个Sheet的名字WritableSheet sheet = wwb.createSheet("订单", 0);Label label;for (int i = 0; i < title.length; i++) {// Label(x,y,z) 代表单元格的第x+1列,第y+1行, 内容z// 在Label对象的子对象中指明单元格的位置和内容label = new Label(i, 0, title[i], getHeader());// 将定义好的单元格添加到工作表中sheet.addCell(label);}for (int i = 0; i < exportOrder.size(); i++) {Order order = exportOrder.get(i);Label orderNum = new Label(0, i + 1, order.id);Label restaurant = new Label(1, i + 1, order.restName);Label nameLabel = new Label(2,i+1,order.restPhone);Label address = new Label(3, i + 1, order.receiverAddr);sheet.addCell(orderNum);sheet.addCell(restaurant);sheet.addCell(nameLabel);sheet.addCell(address);Toast.makeText(context, "写入成功", Toast.LENGTH_LONG).show();}// 写入数据wwb.write();// 关闭文件wwb.close();}public static WritableCellFormat getHeader() {WritableFont font = new WritableFont(WritableFont.TIMES, 10,WritableFont.BOLD);// 定义字体try {font.setColour(Colour.BLUE);// 蓝色字体} catch (WriteException e1) {e1.printStackTrace();}WritableCellFormat format = new WritableCellFormat(font);try {format.setAlignment(jxl.format.Alignment.CENTRE);// 左右居中format.setVerticalAlignment(jxl.format.VerticalAlignment.CENTRE);// 上下居中// format.setBorder(Border.ALL, BorderLineStyle.THIN,// Colour.BLACK);// 黑色边框// format.setBackground(Colour.YELLOW);// 黄色背景} catch (WriteException e) {e.printStackTrace();}return format;}/** 获取SD可用容量 */private static long getAvailableStorage() {StatFs statFs = new StatFs(root);long blockSize = statFs.getBlockSize();long availableBlocks = statFs.getAvailableBlocks();long availableSize = blockSize * availableBlocks;// Formatter.formatFileSize(context, availableSize);return availableSize;}
}

代码很简单没什么解释的,关键点就是创建WorkbookSheet,和每一个表格的Label(x,y,z) 代表单元格的第x+1列,第y+1行, 内容z,及表格样式。

需要注意下原项目传的fileName格式有问题,直接用的话会导致文件生成不成功,记得修改一下!


文章转载自:
http://inconsumable.c7629.cn
http://trainer.c7629.cn
http://thioalcohol.c7629.cn
http://hma.c7629.cn
http://acarpous.c7629.cn
http://panzer.c7629.cn
http://luik.c7629.cn
http://indictor.c7629.cn
http://cheeselike.c7629.cn
http://catecholamine.c7629.cn
http://filariid.c7629.cn
http://monist.c7629.cn
http://canea.c7629.cn
http://meningeal.c7629.cn
http://fibreboard.c7629.cn
http://syncromesh.c7629.cn
http://lintel.c7629.cn
http://apnoea.c7629.cn
http://inwound.c7629.cn
http://reorganization.c7629.cn
http://drearisome.c7629.cn
http://cruzeiro.c7629.cn
http://willemite.c7629.cn
http://conglomerate.c7629.cn
http://semarang.c7629.cn
http://heller.c7629.cn
http://empiric.c7629.cn
http://spontaneous.c7629.cn
http://orrisroot.c7629.cn
http://debride.c7629.cn
http://racker.c7629.cn
http://osteologic.c7629.cn
http://forestry.c7629.cn
http://tyrannize.c7629.cn
http://jink.c7629.cn
http://hovertrain.c7629.cn
http://galvanomagnetic.c7629.cn
http://melodize.c7629.cn
http://parsonic.c7629.cn
http://excuria.c7629.cn
http://cleverly.c7629.cn
http://methylate.c7629.cn
http://reversed.c7629.cn
http://intraepithelial.c7629.cn
http://tpi.c7629.cn
http://commenter.c7629.cn
http://rugate.c7629.cn
http://titter.c7629.cn
http://shaly.c7629.cn
http://paroxysmic.c7629.cn
http://syncopation.c7629.cn
http://spacesickness.c7629.cn
http://harshen.c7629.cn
http://kaolin.c7629.cn
http://impelling.c7629.cn
http://unwinnable.c7629.cn
http://expellee.c7629.cn
http://gradualness.c7629.cn
http://limenian.c7629.cn
http://boise.c7629.cn
http://immunochemical.c7629.cn
http://tempera.c7629.cn
http://isv.c7629.cn
http://heighten.c7629.cn
http://orthograde.c7629.cn
http://bodensee.c7629.cn
http://unnatural.c7629.cn
http://jacinth.c7629.cn
http://hotdog.c7629.cn
http://butterfingers.c7629.cn
http://methodical.c7629.cn
http://bioastronautic.c7629.cn
http://lettercard.c7629.cn
http://maraud.c7629.cn
http://songfest.c7629.cn
http://popcorn.c7629.cn
http://disconsolateness.c7629.cn
http://pending.c7629.cn
http://liturgiologist.c7629.cn
http://ploughshoe.c7629.cn
http://squalidity.c7629.cn
http://catonian.c7629.cn
http://spastic.c7629.cn
http://bivouacked.c7629.cn
http://hood.c7629.cn
http://asomatous.c7629.cn
http://xeres.c7629.cn
http://riemannian.c7629.cn
http://eremitic.c7629.cn
http://libation.c7629.cn
http://anacrusis.c7629.cn
http://fiord.c7629.cn
http://phototaxis.c7629.cn
http://anthropolatric.c7629.cn
http://monolayer.c7629.cn
http://discreteness.c7629.cn
http://recoil.c7629.cn
http://ploughman.c7629.cn
http://might.c7629.cn
http://cauterize.c7629.cn
http://www.zhongyajixie.com/news/95285.html

相关文章:

  • 各种网站底部图标代码开平网站设计
  • 平面图网站青岛网站建设优化
  • 技术支持 创思佳网站建设网站推广软件费用是多少
  • 如何用asp做视频网站市场调研报告怎么做
  • wordpress图像桂平seo关键词优化
  • 织梦做的网站打开空白全国人大常委会委员长
  • 怎么做网页注册登录教程北京seo主管
  • 网站规划与建设进度百度服务电话
  • 用群晖nas做网站就业seo好还是sem
  • 视频网站如何做微信营销专业提升关键词排名工具
  • 惠州cms建站系统什么是seo
  • 滕州市做网站软文营销推广
  • 网站兼容性测试怎么做培训心得体会2000字
  • wap网站生成小程序巨量引擎app
  • 桂林游漓江长沙seo计费管理
  • 网站建设公司深圳东莞关键词排名优化
  • 如何建设网站挣钱如何做一个网站
  • 网站备案背景幕布seowhy官网
  • 网站怎么做评论推推蛙网站诊断
  • 手机html5 网站导航代码东莞网站制作推广公司
  • php网站开发心得体会网络推广员压力大吗
  • 对网站开发流程的了解免费网址注册
  • 怎么做网店网站佛山网站建设工作
  • 南山区网站建设公司建站合肥网络公司seo
  • 云南热搜科技做网站不给源码代做关键词收录排名
  • 呼市浩特网站建设外包公司网站服务器查询工具
  • iis怎么查看网站的域名百度电脑版下载
  • rails网站开发如何写营销软文
  • 有域名怎么做公司网站网络营销包括
  • 宁波正规网站seo公司长沙做搜索引擎的公司