JXL rename a sheet
Hi I have a template excel which I load and would like to change a sheet name in that.
开发者_Python百科WritableWorkbook workbook = jxl.Workbook.createWorkbook(file1,template);
This workbook has n sheets. I would like to change the name of a single sheet. Incase of remove there is a method called
workbook.removeSheet(<sheet index>)
I dont find any such direct method for rename.
Can someone help me in this regard.
No direct method seems to exist. I'd try a copySheet(oldName, newName,newIndex) followed by a removeSheet(oldIndex)
workbook.createSheet("Name", i);
WritableSheet excelSheet = workbook.getSheet(i);
and to modify the name
excelSheet.setName("new name");
精彩评论