public class VbaProject
extends java.lang.Object
Example
//Instantiating a Workbook object
Workbook workbook = new Workbook();
// Init VBA project.
VbaProject vbaProject = workbook.getVbaProject();
//Saving the Excel file
workbook.save("book1.xlsm");
| Modifier and Type | Method and Description |
|---|---|
void |
copy(VbaProject source)
Copy VBA project from other file.
|
byte[] |
getCertRawData()
Gets certificate raw data if this VBA project is signed.
|
Encoding |
getEncoding()
Gets the encoding of VBA project.
|
boolean |
getIslockedForViewing()
Indicates whether this VBA project is locked for viewing.
|
VbaModuleCollection |
getModules()
Gets all
VbaModule objects. |
java.lang.String |
getName()
Gets the name of the VBA project.
|
VbaProjectReferenceCollection |
getReferences()
Gets all references of VBA project.
|
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.
|
void |
protect(boolean islockedForViewing,
java.lang.String password)
Protects or unprotects this VBA project.
|
void |
setEncoding(Encoding value)
Sets the encoding of VBA project.
|
void |
setName(java.lang.String value)
Sets the name of the VBA project.
|
void |
sign(DigitalSignature digitalSignature)
Sign this VBA project by a DigitalSignature
|
boolean |
validatePassword(java.lang.String password)
Validates protection password.
|
public void sign(DigitalSignature digitalSignature)
digitalSignature - DigitalSignaturepublic boolean isValidSigned()
public byte[] getCertRawData()
public Encoding getEncoding()
public void setEncoding(Encoding value)
public java.lang.String getName()
public void setName(java.lang.String value)
public boolean isSigned()
public void protect(boolean islockedForViewing,
java.lang.String password)
Remarks
If islockedForViewing is true, the password could not be null.islockedForViewing - indicates whether locks project for viewing.password - If the value is null, unprotects this VBA project, otherwise projects the this VBA project.public boolean isProtected()
public boolean getIslockedForViewing()
public void copy(VbaProject source)
source - public VbaModuleCollection getModules()
VbaModule objects.public VbaProjectReferenceCollection getReferences()
public boolean validatePassword(java.lang.String password)
password - the passwordSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.