java.lang.Object
com.aspose.cells.VbaProject
public class VbaProject
Example:
//Instantiating a Workbook object
Workbook workbook = new Workbook();
// Init VBA project.
VbaProject vbaProject = workbook.getVbaProject();
//Saving the Excel file
workbook.save("book1.xlsm");
| Property Getters/Setters Summary | ||
|---|---|---|
byte[] | getCertRawData() | |
| Gets certificate raw data if this VBA project is signed. | ||
boolean | getIslockedForViewing() | |
| Indicates whether this VBA project is locked for viewing. | ||
boolean | isProtected() | |
| Indicates whether this VBA project is protected. | ||
boolean | isSigned() | |
| Indicates whether VBAcode is signed or not. | ||
boolean | isValidSigned() | |
| Indicates whether the signature of VBA project is valid or not. | ||
VbaModuleCollection | getModules() | |
|
Gets all |
||
java.lang.String | getName() | |
void | setName(java.lang.String) | |
| Gets and sets the name of the VBA project. | ||
VbaProjectReferenceCollection | getReferences() | |
| Gets all references of VBA project. | ||
| Method Summary | ||
|---|---|---|
void | copy(VbaProject source) | |
| Copy VBA project from other file. | ||
void | protect(boolean islockedForViewing, java.lang.String password) | |
| Protects or unprotects this VBA project. | ||
void | sign(DigitalSignature digitalSignature) | |
| Sign this VBA project by a DigitalSignature | ||
boolean | validatePassword(java.lang.String password) | |
| Validates protection password. | ||
| Property Getters/Setters Detail |
|---|
isValidSigned | |
public boolean isValidSigned() | |
getCertRawData | |
public byte[] getCertRawData() | |
getName/setName | |
public java.lang.String getName() / public void setName(java.lang.String value) | |
isSigned | |
public boolean isSigned() | |
isProtected | |
public boolean isProtected() | |
getIslockedForViewing | |
public boolean getIslockedForViewing() | |
getModules | |
public VbaModuleCollection getModules() | |
getReferences | |
public VbaProjectReferenceCollection getReferences() | |
| Method Detail |
|---|
sign | |
public void sign(DigitalSignature digitalSignature) throws java.lang.Exception | |
digitalSignature - DigitalSignatureprotect | |
public void protect(boolean islockedForViewing, java.lang.String password) | |
islockedForViewing - indicates whether locks project for viewing.password -
If the value is null, unprotects this VBA project, otherwise projects the this VBA project.
copy | |
public void copy(VbaProject source) | |
source - validatePassword | |
public boolean validatePassword(java.lang.String password) | |
password - the password