addWithSheet method
Add worksheet with name to the collection .
Workbook workbook = new Workbook();
Worksheet sheet = new Worksheet(workbook);
workbook.worksheets.addWithSheet(sheet);
workbook.save('AddWorksheet.xlsx');
workbook.dispose();
Implementation
void addWithSheet(Worksheet worksheet) {
if (!innerList.contains(worksheet)) {
worksheet.index = count + 1;
innerList.add(worksheet);
}
}