//package com.ian.media.util.excel;
//
//import java.io.ByteArrayInputStream;
//import java.io.ByteArrayOutputStream;
//import java.io.File;
//import java.io.FileOutputStream;
//import java.io.IOException;
//import java.io.InputStream;
//import java.io.OutputStream;
//import java.text.DecimalFormat;
//import java.text.ParseException;
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Date;
//import java.util.LinkedHashMap;
//import java.util.List;
//import java.util.Map;
//import java.util.Set;
//import java.util.Map.Entry;
//
//import org.apache.commons.lang.StringUtils;
//import org.apache.poi.hssf.usermodel.DVConstraint;
//import org.apache.poi.hssf.usermodel.HSSFCell;
//import org.apache.poi.hssf.usermodel.HSSFCellStyle;
//import org.apache.poi.hssf.usermodel.HSSFDataValidation;
//import org.apache.poi.hssf.usermodel.HSSFRichTextString;
//import org.apache.poi.hssf.usermodel.HSSFRow;
//import org.apache.poi.hssf.usermodel.HSSFSheet;
//import org.apache.poi.hssf.usermodel.HSSFWorkbook;
//import org.apache.poi.ss.usermodel.Cell;
//import org.apache.poi.ss.usermodel.CellStyle;
//import org.apache.poi.ss.usermodel.Font;
//import org.apache.poi.ss.usermodel.IndexedColors;
//import org.apache.poi.ss.usermodel.Sheet;
//import org.apache.poi.ss.usermodel.Workbook;
//import org.apache.poi.ss.util.CellRangeAddress;
//import org.apache.poi.ss.util.CellRangeAddressList;
//import org.apache.poi.ss.util.RegionUtil;
//import org.apache.poi.xssf.usermodel.XSSFCell;
//
//import com.ian.das.model.AppointmentRecord;
//
///**
// * 文件名称:ExcelUtils.java 文件描述: 项目通用Excel操作工具类 完成日期:2014年6月3日
// *
// * @author amos
// */
//public class ExcelUtils {
// private HSSFWorkbook wb;// Excel文件对象
// private CellStyle titleStyle; // 标题行样式
// private Font titleFont; // 标题行字体
// private CellStyle dateStyle; // 日期行样式
// private Font dateFont; // 日期行字体
// private CellStyle headStyle; // 表头行样式
// private Font headFont; // 表头行字体
// private CellStyle leftTextStyle; // 居左文本样式
// private Font leftTextFont; // 居左文本字体
// private CellStyle centerTextStyle; // 居中文本样式
// private Font centerTextFont; // 居中文本字体
// private CellStyle rightTextStyle; // 居右文本样式
// private Font rightTextFont; // 居右文字字体
//
// /**
// * EXCEL导出工具类初始化工作,初始化工具类提供的默认字体,样式等等操作对象
// *
// * @param useDefaultSetting
// * 是否使用工具类通用配置 如果参数为true,工具类提供的所有字体样式将以默认行为进行初始化
// * 如果参数为false,建议通过initFont与initCellStyle方法手动建立需要的字体和单元格样式
// */
// public void init(Boolean useDefaultSetting) {
// wb = new HSSFWorkbook();
//
// titleFont = wb.createFont();
// dateFont = wb.createFont();
// headFont = wb.createFont();
// leftTextFont = wb.createFont();
// centerTextFont = wb.createFont();
// rightTextFont = wb.createFont();
// titleStyle = wb.createCellStyle();
// dateStyle = wb.createCellStyle();
// headStyle = wb.createCellStyle();
// leftTextStyle = wb.createCellStyle();
// centerTextStyle = wb.createCellStyle();
// rightTextStyle = wb.createCellStyle();
// if (useDefaultSetting) {
// useDefaultSettng();
// }
// }
//
// /**
// * 初始化标题行字体
// */
// public void initTitleFont() {
// initFont(titleFont, "宋体", 16, Font.BOLDWEIGHT_BOLD,
// IndexedColors.BLACK.index);
// }
//
// /**
// * 初始化日期行字体
// */
// public void initDateFont() {
// initFont(dateFont, "宋体", 14, Font.BOLDWEIGHT_BOLD,
// IndexedColors.BLACK.index);
// }
//
// /**
// * 初始化表头行字体
// */
// public void initHeadFont() {
// initFont(headFont, "宋体", 14, Font.BOLDWEIGHT_BOLD,
// IndexedColors.BLACK.index);
// }
//
// /**
// * 初始化居左文字字体
// */
// public void initLeftTextFont() {
// initFont(leftTextFont, "宋体", 14, Font.BOLDWEIGHT_NORMAL,
// IndexedColors.BLACK.index);
// }
//
// /**
// * 初始化居中文字字体
// */
// public void initCenterTextFont() {
// initFont(centerTextFont, "宋体", 14, Font.BOLDWEIGHT_NORMAL,
// IndexedColors.BLACK.index);
// }
//
// /**
// * 初始化居右文字字体
// */
// public void initRightTextFont() {
// initFont(rightTextFont, "宋体", 14, Font.BOLDWEIGHT_NORMAL,
// IndexedColors.BLACK.index);
// }
//
// /**
// * 定义标题行样式
// */
// public void initTitleStyle() {
// initCellStyle(titleStyle, titleFont, CellStyle.ALIGN_CENTER,
// CellStyle.VERTICAL_CENTER, null, null, null, null, null, null,
// null, null, null);
// }
//
// /**
// * 定义日期行样式
// */
// public void initDateStyle() {
// initCellStyle(dateStyle, dateFont, CellStyle.ALIGN_LEFT,
// CellStyle.VERTICAL_CENTER, null, null, null, null, null, null,
// null, null, null);
// }
//
// /**
// * 定义表头行样式
// */
// public void initHeadStyle() {
// initCellStyle(headStyle, headFont, CellStyle.ALIGN_CENTER,
// CellStyle.VERTICAL_CENTER, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, null, null, null, null, null);
// }
//
// /**
// * 定义居左文本样式
// */
// public void initLeftTextStyle() {
// initCellStyle(leftTextStyle, leftTextFont, CellStyle.ALIGN_LEFT,
// CellStyle.VERTICAL_CENTER, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, null, null, null, null, null);
// }
//
// /**
// * 定义居中文本样式
// */
// public void initCenterTextStyle() {
// initCellStyle(centerTextStyle, centerTextFont, CellStyle.ALIGN_CENTER,
// CellStyle.VERTICAL_CENTER, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, null, null, null, null, null);
// }
//
// /**
// * 定义居右文本样式
// */
// public void initRightTextStyle() {
// initCellStyle(rightTextStyle, rightTextFont, CellStyle.ALIGN_RIGHT,
// CellStyle.VERTICAL_CENTER, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, HSSFCellStyle.BORDER_THIN,
// HSSFCellStyle.BORDER_THIN, null, null, null, null, null);
// }
//
// /**
// * 使用所有默认配置
// */
// public void useDefaultSettng() {
// initTitleFont();
// initTitleStyle();
// initDateFont();
// initDateStyle();
// initHeadFont();
// initHeadStyle();
// initLeftTextFont();
// initLeftTextStyle();
// initCenterTextFont();
// initCenterTextStyle();
// initRightTextFont();
// initRightTextStyle();
// }
//
// /**
// * @Description: 定义字体通用方法
// */
// public static void initFont(Font font, String fontName,
// Integer fontHeightInPoints, Short boldWeight, Short color) {
// if (null != fontName) {
// font.setFontName(fontName);
// }
// if (null != fontHeightInPoints) {
// font.setFontHeightInPoints(Short.parseShort(String
// .valueOf(fontHeightInPoints)));
// }
// if (null != boldWeight) {
// font.setBoldweight(boldWeight);
// }
// if (null != color) {
// font.setColor(color);
// }
// }
//
// /**
// * 定义单元格样式的通用方法
// *
// * @param cellStyle
// * 需要设置样式的单元格
// * @param font
// * 单元格所用字体
// * @param alignment
// * 文字水平对齐方式
// * @param verticalAlignment
// * 文字垂直对齐方式
// * @param fillBackgroundColor
// * 单元格背景色
// * @param borderTop
// * 单元格顶部边框样式
// * @param borderBottom
// * 单元格底部边框样式
// * @param borderLeft
// * 单元格左部边框样式
// * @param borderRight
// * 单元格右部边框样式
// * @param to
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
基于SSM的医院科室人员管理系统设计与实现毕业论文+任务书+项目源码及数据库.zip (2000个子文件)
ToolUtil.class 30KB
StringUtil.class 15KB
UtilController.class 12KB
WxService.class 12KB
JSONUtil.class 11KB
DateUtil.class 11KB
PowerRoleController.class 11KB
ReflectionUtils.class 10KB
PowerMenuController.class 10KB
PowerUserController.class 10KB
BaseController.class 9KB
DateUtil.class 7KB
FileUtil.class 7KB
PowerUser.class 6KB
MemberController.class 6KB
ImagePrint.class 6KB
MoblieUserController.class 6KB
BackupController.class 5KB
AES.class 5KB
Member.class 5KB
Backup.class 4KB
CoderUtils.class 4KB
SecCodeController.class 4KB
chuyuanController.class 4KB
zhuyuanController.class 4KB
shoufeiController.class 4KB
bingfangController.class 4KB
liuyanController.class 4KB
renyuanController.class 4KB
SignUtil.class 4KB
MyEclipseKeyGen.class 4KB
MySSLProtocolSocketFactory.class 4KB
PowerMenu.class 4KB
LogLoginController.class 4KB
DictionaryController.class 3KB
TextSearchFile.class 3KB
ExportUtil.class 3KB
LogEmail.class 3KB
LogEmailController.class 3KB
PowerMenuC.class 3KB
PowerRole.class 3KB
MobileUser.class 3KB
SessionFilter.class 3KB
LogLogin.class 2KB
Const.class 2KB
MatrixToImageWriter.class 2KB
Time.class 2KB
UploadImage.class 2KB
JSONStringDateTimeProcessor.class 2KB
SHA1.class 2KB
JSONDateProcessor.class 2KB
JSONDateTimeProcessor.class 2KB
StringUtil.class 2KB
vshoufei.class 2KB
chuyuan.class 2KB
zhuyuan.class 2KB
MD5.class 2KB
JsonDateTimeSerializer.class 2KB
JsonDateSerializer.class 2KB
Floatimg.class 2KB
PageBean.class 1KB
shoufei.class 1KB
WxInterface.class 1KB
MySSLProtocolSocketFactory$TrustAnyTrustManager.class 1KB
PowerRoleUser.class 1KB
Dictionary.class 1KB
bingfang.class 1KB
renyuan.class 1KB
liuyan.class 1KB
AesException.class 1KB
Test.class 1KB
vshoufeiController.class 1KB
JSONIntegerProcessor.class 1KB
PowerRoleMenu.class 1KB
TextSearchFile$1.class 1KB
Backup$1.class 1KB
BaseDao.class 969B
MyX509TrustManager.class 891B
FileClass.class 724B
URLCollect.class 590B
IDGenerator.class 590B
MemberMapper.class 507B
PowerRoleUserMapper.class 497B
test1.class 485B
Constant.class 473B
PowerMenuMapper.class 472B
PowerRoleMenuMapper.class 435B
LogLoginMapper.class 413B
FloatimgMapper.class 383B
GlobalKeys.class 375B
MobileUserMapper.class 284B
DictionaryMapper.class 284B
PowerRoleMapper.class 281B
PowerUserMapper.class 281B
LogEmailMapper.class 278B
bingfangMapper.class 278B
vshoufeiMapper.class 277B
renyuanMapper.class 275B
zhuyuanMapper.class 275B
shoufeiMapper.class 275B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
马coder
- 粉丝: 1201
- 资源: 6602
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功