Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{description}
{excerpt}To decrypt an encrypted template, set [DecryptPassword|ExcelTemplate.DecryptPassword] to the password set using [EncryptPassword|ExcelTemplate.EncryptPassword] or in Microsoft Excel \(Tools \-> Options... \-> Security\).
{excerpt}
{signature:C#}
 public System.String DecryptPassword{ get; set; }
{signature}
{signature:vb.net}
Public Property DecryptPassword() As String
{signature}
{remarks}Set {{DecryptPassword}} before calling [Open|ExcelTemplate.Open].

{remarks}
{example}{code:csharp|title=C#}

          ExcelTemplate xlt = new ExcelTemplate();
          xlt.DecryptPassword = "password";
          xlt.Open(Application["templatepath"] +
               @"\DataBinding\EmployeeOrdersTemplate.xls");
        {code}
{code:vb.net|title=vb.net}

          Dim xlt As New ExcelTemplate()
          xlt.DecryptPassword = "password"
          xlt.Open(Application["templatepath"] & _
               "\DataBinding\EmployeeOrdersTemplate.xls")
        {code}

{example}