{"action":"opened","issue":{"url":"https://api.github.com/repos/alibaba/easyexcel/issues/199","repository_url":"https://api.github.com/repos/alibaba/easyexcel","labels_url":"https://api.github.com/repos/alibaba/easyexcel/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/alibaba/easyexcel/issues/199/comments","events_url":"https://api.github.com/repos/alibaba/easyexcel/issues/199/events","html_url":"https://github.com/alibaba/easyexcel/issues/199","id":394914426,"node_id":"MDU6SXNzdWUzOTQ5MTQ0MjY=","number":199,"title":"关于写单个sheet中多个table和写多个sheet含有单个table的问题","user":{"login":"ws2823147532","id":19347103,"node_id":"MDQ6VXNlcjE5MzQ3MTAz","avatar_url":"https://avatars0.githubusercontent.com/u/19347103?v=4","gravatar_id":"","url":"https://api.github.com/users/ws2823147532","html_url":"https://github.com/ws2823147532","followers_url":"https://api.github.com/users/ws2823147532/followers","following_url":"https://api.github.com/users/ws2823147532/following{/other_user}","gists_url":"https://api.github.com/users/ws2823147532/gists{/gist_id}","starred_url":"https://api.github.com/users/ws2823147532/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ws2823147532/subscriptions","organizations_url":"https://api.github.com/users/ws2823147532/orgs","repos_url":"https://api.github.com/users/ws2823147532/repos","events_url":"https://api.github.com/users/ws2823147532/events{/privacy}","received_events_url":"https://api.github.com/users/ws2823147532/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-31T00:45:03Z","updated_at":"2018-12-31T00:45:03Z","closed_at":null,"author_association":"NONE","body":"您好，我在使用easyexcel写excel的时候，发现有以下的问题：\r\n1、向单个sheet中连续调用 writer.write1()，写入数据时，可以实现追加行到sheet中\r\n2、向多个sheet中分别连续调用 writer.write1()，写入数据时，最终的结果是，每个sheet中的写入的数据的效果和向sheet中写入多个table一样。\r\n\r\n效果截图如下：\r\n![image](https://user-images.githubusercontent.com/19347103/50552842-01d8d400-0cd7-11e9-9803-a52a24c44c05.png)\r\n![image](https://user-images.githubusercontent.com/19347103/50552837-fa192f80-0cd6-11e9-9433-fe4e4bc857bc.png)\r\n使用的代码如下：\r\nwriter.write1(data, sheet1);//我是连续的调用write1方法\r\n\r\n实际上，我发现您在源码中是判断了WriteContext.currentSheetParam和传入的sheet是否指向的同一个sheet，然后执行initCurrentSheet(sheet)，重新初始化了表头。但是由于每次记录的都是上一个sheet，那么我循环写入同一个sheet时，就会误判成一个新的sheet，然后就导致重新初始化了表头。。。。\r\n\r\n\r\n我暂时的解决方案是，在调用writer.write1()之前，先通过反射的方式设置了currentSheetParam和currentSheet。\r\n\r\n希望您可以在源码 中兼容这种方式的写操作。\r\n\r\n"}}
{"actor":{"display_login":"ws2823147532"}}