java操作Excel的poi基础语法

创建一个简单的实列

package com.java.poi;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;

import java.io.FileOutputStream;

/**
 * @author nidegui
 * @create 2019-06-17 9:26
 */
public class Test1 {

    public static void main(String[] args) throws Exception {
        Workbook wb= new HSSFWorkbook(); //实列,新建一个工作簿
        FileOutputStream fileOutputStream=new FileOutputStream("E:\\poi你好.xls");
        wb.write(fileOutputStream);
        fileOutputStream.close();
    }
}

  

posted on 2019-06-17 10:03  nidegui  阅读(523)  评论(0编辑  收藏  举报