Fix password setting

This commit is contained in:
Doug Finke
2015-04-13 10:16:01 -04:00
parent 952285f531
commit 5d4662bd49

View File

@@ -158,7 +158,7 @@ function Export-Excel {
}
}
$ws.Protection.SetPassword($Password)
if($Password) { $ws.Protection.SetPassword($Password) }
$pkg.Save()
$pkg.Dispose()