您的位置:首页 > 编程语言 > Java开发

java导出Excel工具类

2013-11-07 09:54 375 查看
package com.excel;

import java.io.OutputStream;
import java.util.Map;

import jxl.write.NumberFormat;
import jxl.write.WritableSheet;

public class VerifyUtil {

public static boolean isNullObject(String[][] content, OutputStream os) {
// TODO Auto-generated method stub
if(content != null && content.length > 0 && os != null)
{
return false;
}
return true;
}

public static boolean isNull2DArray(String[][] content) {
// TODO Auto-generated method stub
if(content != null && content.length > 0)
{
return false;
}
return true;
}

public static boolean isNullObject(NumberFormat nf) {
// TODO Auto-generated method stub
if(nf != null)
{
return false;
}
return true;
}

public static boolean isNullObject(String sheetName) {
if(sheetName != null && !"".equals(sheetName.trim()))
{
return false;
}
return true;
}

public static boolean isNullObject(Map<String, String[][]> content,
OutputStream os) {
// TODO Auto-generated method stub
if(content != null && content.size() > 0 && os != null)
{
return false;
}
return true;
}

public static boolean isNull1DArray(String[] mergeInfo) {
// TODO Auto-generated method stub
if(mergeInfo != null && mergeInfo.length > 0)
{
return false;
}
return true;
}

public static boolean isNullObject(WritableSheet sheet) {
// TODO Auto-generated method stub
if(sheet != null)
{
return false;
}
return true;
}

}


VerifyUtil
本文旨在学习如何用Java导出Excel,具体细节还需要进一步完善。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: