Password protecting files
Posted: Thu Nov 27, 2014 12:25 pm
Hi,
We are trying to create password-protected files. The logic used is:
XLS := TXLSReadWriteII5.Create (Nil);
XLS.FileName := 'SampleFilename.xls'; // also tried 'SampleFileName.xlsx'
XLS.Version := xvExcel97; // also tried xvExcel2007
XLS.Password := 'Password';
// code to fill in the cells
XLS.Write;
The files contain the correct data, however they are not password-protected. This was working with XLSReadWriteII version 4.
We'd be grateful of any help here.
Thanks
-- Dave
We are trying to create password-protected files. The logic used is:
XLS := TXLSReadWriteII5.Create (Nil);
XLS.FileName := 'SampleFilename.xls'; // also tried 'SampleFileName.xlsx'
XLS.Version := xvExcel97; // also tried xvExcel2007
XLS.Password := 'Password';
// code to fill in the cells
XLS.Write;
The files contain the correct data, however they are not password-protected. This was working with XLSReadWriteII version 4.
We'd be grateful of any help here.
Thanks
-- Dave