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

 

SetExcelOpenPassword

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

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

 

SetExcelOpenPassword

 

 

Sets the password to open the XLSX file.

 

 

 

Prototype :

 

void SetExcelOpenPassword

(

       string ExcelOpenPassword

)

 

 

 

Arguments :

 

ExcelOpenPassword

password to open

 

 

 

Reference :

 

This function is only supported in XLSX format.

 

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

 

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

 

 

 

Example :

 

var objPage = ReportTemplate.GetCurrentPage();

if(objPage != null) {

  objPage.SetExcelOpenPassword("FORCS");

}

 

 

 

Available Events :

 

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

 

 

 

See also :

 

SetExportFileName