IXlsProtectedRange
COM interface ( getting help with interfaces )

 

interface IXlsProtectedRange : IDispatch
{
  [id(1),propput] HRESULT Password([in]BSTR password);
  [id(2),propget] HRESULT Range([out, retval] BSTR* cellrange);
  [id(2),propput] HRESULT Range([in] BSTR cellrange);
  [id(3)]         HRESULT Delete();
  [id(4)]         HRESULT AddUserOrGroup([in]BSTR name);

}

 

HRESULT Password([in]BSTR password);
sets an optional password.

HRESULT Range([out, retval] BSTR* cellrange);
retrieves the full definition of the range. It includes one or more contiguous blocks of cells, separated by semi-colons. The format used is RxxCx:RyyCy.

HRESULT Range([in] BSTR cellrange);
sets the full definition of the range. It includes one or more contiguous blocks of cells, separated by semi-colons. The format used is RxxCx:RyyCy.

HRESULT Delete();
deletes the protected range.

HRESULT AddUserOrGroup([in]BSTR name);
adds a user or group to the list of persons allowed to make edits in the range. Use domain name syntax if possible (domain_name\user_name). Does not work with Windows 9X.