public class test {
/**
* 导出的CVS文件
* @param exportData 要导入Excel 的数据集合
* @param rowMapper Excel 表头部分
* @param outputPath Excel 文件的保存位置
* @return Excel文件
*/
@SuppressWarnings("rawtypes")
public static File createCSVFile(List exportData,LinkedHashMap rowMapper,String outputPath){
File csvFile = null;
BufferedWriter csvFileoutputStream = null;
try {
String temp="数据动态更新情况对比分析统计表_";
csvFile = File.createTempFile(temp, ".csv",new File(outputPath));
//GB2312使正确读取分隔符“,”
csvFileoutputStream = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(csvFile),"GB2312"),1024);
//写入文件头部
for(Iterator propertyIterator =rowMapper.entrySet().iterator();propertyIterator.hasNext();){
java.util.Map.Entry propertyEntery = (java.util.Map.Entry)proper
/**
* 导出的CVS文件
* @param exportData 要导入Excel 的数据集合
* @param rowMapper Excel 表头部分
* @param outputPath Excel 文件的保存位置
* @return Excel文件
*/
@SuppressWarnings("rawtypes")
public static File createCSVFile(List exportData,LinkedHashMap rowMapper,String outputPath){
File csvFile = null;
BufferedWriter csvFileoutputStream = null;
try {
String temp="数据动态更新情况对比分析统计表_";
csvFile = File.createTempFile(temp, ".csv",new File(outputPath));
//GB2312使正确读取分隔符“,”
csvFileoutputStream = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(csvFile),"GB2312"),1024);
//写入文件头部
for(Iterator propertyIterator =rowMapper.entrySet().iterator();propertyIterator.hasNext();){
java.util.Map.Entry propertyEntery = (java.util.Map.Entry)proper