TOC : Script API > JavaScript > JavaScript API > GeneralScript > Page > Method >

 

SetExcelModifyPassword

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

TOC : Script API > JavaScript > JavaScript API > GeneralScript > Page > Method >

 

SetExcelModifyPassword

 

 

Sets the password to modify the XLSX file.

 

 

 

Prototype :

 

void SetExcelModifyPassword

(

       string ExcelModifyPassword,

       [string UserName]

)

 

 

 

Arguments :

 

ExcelModifyPassword

password to modify

UserName

user name

If not set or set to "", applies to "noname".

 

 

 

Reference :

 

This function is only supported in XLSX format.

 

The password can be up to a maximum of 15 characters. If more than 15 characters will be saved without a password.

 

If this function called more than once on the same page, the first function that is the ExcelModifyPassword is not the empty string.

 

 

 

Example :

 

var objPage = ReportTemplate.GetCurrentPage();

if(objPage != null) {

  objPage.SetExcelModifyPassword("FORCS", "OZ");

}

 

 

 

Available Events :

 

OnAddToPage,  OnCheckValidity,  OnClick,  OnEndBind,  OnFocus,  OnKillFocus,  OnLocationUpdated,  OnValueChanged

 

 

 

See also :

 

SetExportFileName