{"action":"opened","issue":{"url":"https://api.github.com/repos/alibaba/easyexcel/issues/96","repository_url":"https://api.github.com/repos/alibaba/easyexcel","labels_url":"https://api.github.com/repos/alibaba/easyexcel/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/easyexcel/issues/96/comments","events_url":"https://api.github.com/repos/alibaba/easyexcel/issues/96/events","html_url":"https://github.com/alibaba/easyexcel/issues/96","id":372771647,"node_id":"MDU6SXNzdWUzNzI3NzE2NDc=","number":96,"title":"NPE","user":{"login":"chenshun00","id":26037282,"node_id":"MDQ6VXNlcjI2MDM3Mjgy","avatar_url":"https://avatars0.githubusercontent.com/u/26037282?v=4","gravatar_id":"","url":"https://api.github.com/users/chenshun00","html_url":"https://github.com/chenshun00","followers_url":"https://api.github.com/users/chenshun00/followers","following_url":"https://api.github.com/users/chenshun00/following{/other_user}","gists_url":"https://api.github.com/users/chenshun00/gists{/gist_id}","starred_url":"https://api.github.com/users/chenshun00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chenshun00/subscriptions","organizations_url":"https://api.github.com/users/chenshun00/orgs","repos_url":"https://api.github.com/users/chenshun00/repos","events_url":"https://api.github.com/users/chenshun00/events{/privacy}","received_events_url":"https://api.github.com/users/chenshun00/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-23T01:56:08Z","updated_at":"2018-10-23T01:56:08Z","closed_at":null,"author_association":"NONE","body":"完全按照文档\r\n\r\n```java\r\npublic class TestExcel {\r\n    public static void main(String[] args) throws FileNotFoundException {\r\n\r\n        OutputStream out = new FileOutputStream(\"/Users/chenshun/Desktop/78.xlsx\");\r\n        try {\r\n            ExcelWriter writer = new ExcelWriter(out, ExcelTypeEnum.XLSX);\r\n            //写第一个sheet, sheet1  数据全是List<String> 无模型映射关系\r\n            Sheet sheet1 = new Sheet(1, 0);//需要添加User.class才没有这个问题\r\n            sheet1.setSheetName(\"第一个sheet文件\");\r\n            writer.write(getData(), sheet1);\r\n            writer.finish();\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        } finally {\r\n            try {\r\n                out.close();\r\n            } catch (IOException e) {\r\n                e.printStackTrace();\r\n            }\r\n        }\r\n    }\r\n\r\n    private static List<? extends BaseRowModel> getData() {\r\n        List<User> models = new ArrayList<>();\r\n        for (int i = 0; i < 10; i++) {\r\n            User build = User.builder().name(\"cc:\" + i).age(\"22\").email(\"cc@gmail.com\")\r\n                    .address(\"杭州\").sax(\"男\").heigh(\"1231\").last(\"xxxx\").build();\r\n            models.add(build);\r\n        }\r\n        return models;\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"chenshun00"}}