jxl_1
import java.io.File;
import jxl.CellView;
import jxl.Workbook;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.format.Colour;
import jxl.format.UnderlineStyle;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.NumberFormats;
import jxl.format.VerticalAlignment;
import jxl.write.WritableCellFormat;
import jxl.write.WritableFont;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
public class Excel {
private static final String TAG = "Excel";
private static final String TABLE_HEADER[] = { "A", "B", "C", "D", "E",
"F", "G", "H", "I", "crash", "G", "K", "L" };
, , , , , ,
, , , , , , };
private String name;
private WritableCellFormat headerDefaultFormat;
private WritableCellFormat cellDefaultFormat;
private int minTimeIndex;
private WritableCellFormat getHeaderCellDefaultStyle() {
// WritableFont.createFont("宋体"):设置字体为宋体 10:设置字体大小
// WritableFont.BOLD:设置字体加粗(BOLD:加粗 NO_BOLD:不加粗) false:设置非斜体
// UnderlineStyle.NO_UNDERLINE:没有下划线
WritableFont font = ,
WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE);
WritableCellFormat format = new WritableCellFormat();
format.setFont(font);
try {
format.setWrap(false);
// 设置单元格背景色
format.setBackground(Colour.GREEN);
format.setVerticalAlignment(VerticalAlignment.CENTRE);
// 表头内容水平居中显示
format.setAlignment(Alignment.CENTRE);
// format.setShrinkToFit(true);
// 设置表头表格边框样式,整个表格线为粗线、黑色
format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
} catch (WriteException e) {
Log.e(TAG, "Fail to getHeaderCellDefaultStyle():");
Log.e(TAG, e.getMessage());
}
return format;
}
private WritableCellFormat getNormalCellStyle() {
WritableFont font = ,
WritableFont.NO_BOLD, false, UnderlineStyle.NO_UNDERLINE);
WritableCellFormat format = new WritableCellFormat(NumberFormats.TEXT);
format.setFont(font);
try {
format.setBackground(Colour.BLACK);
format.setVerticalAlignment(VerticalAlignment.CENTRE);
format.setAlignment(Alignment.CENTRE);
format.setBorder(Border.ALL, BorderLineStyle.THIN, Colour.BLACK);
} catch (WriteException e) {
Log.e(TAG, "Fail to getNormalCellStyle():");
Log.e(TAG, e.getMessage());
}
return format;
}
}
jxl_1的更多相关文章
随机推荐
- 初始Python
一.Python简介 1.Python前世今生 python的创始人为吉多·范罗苏姆(Guido van Rossum).1989年的圣诞节期间,吉多·范罗苏姆为了在阿姆斯特丹打发时间,决心开发一个新 ...
- redhat note
1,iptables -I INPUT 5 -m state --state NEW -p tcp --dport 80 -j ACCEPT
- Discovering-论文
Discovering Spatio-Temporal Causal Interactions in Traffic Data Streams data:real taxi trajectories ...
- Css定位之relative_慕课网课程笔记
前言 最近在慕课网上跟着张鑫旭大神重新学习一遍CSS相关的知识,以下是学习的笔记以及个人一些理解 relative对绝对定位的限制 1.限制绝对定位 绝对定位的top.left.right和botto ...
- C++ Sqlite3
/* 回调函数的格式如下: int sqlite_callback( void* pv, //由 sqlite3_exec() 的第四个参数传递而来 int argc, //表的列数 char** a ...
- Python Thread related
1.Thread.join([timeout]) Wait until the thread terminates. This blocks the calling thread until the ...
- MIL 多示例学习 特征选择
一个主要的跟踪系统包含三个成分:1)外观模型,通过其可以估计目标的似然函数.2)运动模型,预测位置.3)搜索策略,寻找当前帧最有可能为目标的位置.MIL主要的贡献在第一条上. MIL与CT的不同在于后 ...
- photoshop学习入门:选择和处理
昨天花了一天时间看了李涛的视频<高手之路>入门的24集,累得连写工作日报的力气都没了,19点就睡.今天4点起来,补一下记录. photoshop是个位图处理工具(别的花里胡哨的功能忽略)— ...
- JVM内存管理
前几天公司的郑大晔校上,XXX同事做了JVM的Session,于是趁端午节放假的功夫,研究了一些JVM相关的知识. 在Java生态系统中,JVM占据至关重要的作用,就像一个适配器,它向编程语言(主要是 ...
- HTML5 Web app开发工具Kendo UI Web中如何绑定网格到远程数据
在前面的文章中对于Kendo UI中的Grid控件的一些基础的配置和使用做了一些介绍,本文来看看如何将Kendo UI 中的Grid网格控件绑定到远程数据. 众所周知Grid网格控件是用户界面的一个重 ...