Protect sheet when xlsx

Scott Klement's open source interface to the POI HSSF/XSSF Spreadsheet Project for RPG Programmers. http://www.scottklement.com/poi/
Post Reply
jeqberry
Posts: 5
Joined: Wed Jan 19, 2022 10:53 pm

Protect sheet when xlsx

Post 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);
jeqberry
Posts: 5
Joined: Wed Jan 19, 2022 10:53 pm

Re: Protect sheet when xlsx

Post by jeqberry »

Found it. Had to XSSF on the prototype for the protect sheet.
Post Reply