当前位置: 代码迷 >> Web前端 >> 生成Excel资料
  详细解决方案

生成Excel资料

热度:194   发布时间:2012-09-16 17:33:17.0
生成Excel文件
  private static final String filePath="D:\\";
	private static final String fileName="123.csv";
	public static void main(String[] args) {
		StringBuffer conValue = new StringBuffer();
		conValue.append("123,234,567\r\n");
		try {
			FileWriter writer = new FileWriter(filePath+fileName);
			writer.write(conValue.toString());
			writer.close();
			
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

  相关解决方案