Page 1 of 1

Protect sheet when xlsx

Posted: Fri Mar 04, 2022 7:02 pm
by jeqberry
I have a program that was writing xls. I changed it to use the new HSSFR4 in order to handled xlsx. It works well, except for the Protect Sheet. Is does not want to protect the sheet. I do not see any errors. Maybe is should not be hssf any longer?
D ssSheet_protectSheet...
D PR ExtProc( *Java
D : 'org.apache.poi.hssf-
D .usermodel.HSSFSheet'
D : 'protectSheet' )
D password like(jString) const

D password s like(jString)

sheet = ss_getSheet(book: 'SUMMARY');
password = new_String('JBC123');
ssSheet_protectSheet(sheet: password);

Re: Protect sheet when xlsx

Posted: Fri Mar 04, 2022 8:15 pm
by jeqberry
Found it. Had to XSSF on the prototype for the protect sheet.