How to delete a row from an excel using JXL

我的未来我决定 提交于 2019-12-13 16:24:12

问题


I am new to JXL and have worked on read and write of Excel files. But I could not find a function which would delete a row after I successfully read that row and move to the next.

Code logic: If(readrow() == true) { deleteRow(); }

Is there any example available? If there is no delete function can I copy the row to a new sheet and after all the rows are complete I would rename this sheet as the old sheet and remove the old sheet? Thanks


回答1:


JXL does have a delete/remove row function... check this link for help

for(int i=0;i<count;i++){

if(doneWithRow){
sheet.removeRow(i);
}
}

the code example is not much but should get you started.



来源:https://stackoverflow.com/questions/6885587/how-to-delete-a-row-from-an-excel-using-jxl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!