does anybody how to protect a excel document made with ruby and then put
a password /??
Foreero I. wrote:
does anybody how to protect a excel document made with ruby and then put
a password /??
To password-protect an Excel workbook, set the workbook object’s
Password property before calling the SaveAs() method:
wb.Password = ‘MyPassword’
wb.SaveAs(‘c:\temp\xlpsw.xls’)
To open a password-protected workbook, either call the standard Open()
method…
wb = xl.Workbooks.Open(‘c:\temp\xlpsw.xls’)
…and then you will be prompted to enter the password…
…or pass the password as an argument hash to the Open() method:
wb = xl.Workbooks.Open(‘c:\temp\xlpsw.xls’, {‘password’ =>
‘MyPassword’})
Hope that helps.
David
Thanks !!!