Cloning/Duplicating a "TEMPLATE" worksheet
request for the author to add to the guide the method to clone a worksheet as the feature is present but not documented and it is such a useful feature... often times we have a template we need to duplicate over and over in a workbook and the process to do that is not described in the documentation resulting in hours and hours lost searching and finding undocumented and bad implemented stuff in the issues and there is no other source of information about but here, so I want to contribute with the correct way (or AT LEAST what I have found) is working perfectly and for massive worksheet clonation with 0 issue at the moment
let sheetToClone = workbook.getWorkSheet("ID TO CLONE")
let cloneSheet = workbook.addWorkSheet("Sheet")
cloneSheet.model = sheetToClone.model
cloneSheet.name = "THE REAL ID/NAME YOU WANT FOR THIS SHEET"
//DO STUFF HERE
return workbook.xlsx.writeFile("your_file")
P.S sorry if this is not the write place to put this.. feel free to delete it but i think many devs out there would benefit from this as I do and I couldn't before
See also #91 #337.
when done in react the file comes out corrupted