public class VbaProjectReferenceCollection extends CollectionBase
Example
//Instantiating a Workbook object
Workbook workbook = new Workbook();
// Init VBA project.
VbaProject vbaProject = workbook.getVbaProject();
// Add vba project reference
vbaProject.getReferences().addRegisteredReference("stdole", "\*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation");
//Saving the Excel file
workbook.save("book1.xlsm");
| Modifier and Type | Method and Description |
|---|---|
int |
addControlRefrernce(java.lang.String name,
java.lang.String libid,
java.lang.String twiddledlibid,
java.lang.String extendedLibid)
Add a reference to a twiddled type library and its extended type library.
|
int |
addProjectRefrernce(java.lang.String name,
java.lang.String absoluteLibid,
java.lang.String relativeLibid)
Adds a reference to an external VBA project.
|
int |
addRegisteredReference(java.lang.String name,
java.lang.String libid)
Add a reference to an Automation type library.
|
void |
copy(VbaProjectReferenceCollection source)
Copies references from other VBA project.
|
VbaProjectReference |
get(int i)
Get the reference in the list by the index.
|
public VbaProjectReference get(int i)
get in class CollectionBasei - The index.public int addRegisteredReference(java.lang.String name,
java.lang.String libid)
name - The name of reference.libid - The identifier of an Automation type library.public int addControlRefrernce(java.lang.String name,
java.lang.String libid,
java.lang.String twiddledlibid,
java.lang.String extendedLibid)
name - The name of reference.libid - The identifier of an Automation type library.twiddledlibid - The identifier of a twiddled type libraryextendedLibid - The identifier of an extended type librarypublic int addProjectRefrernce(java.lang.String name,
java.lang.String absoluteLibid,
java.lang.String relativeLibid)
name - The name of reference.absoluteLibid - The referenced VBA project's identifier with an absolute path.relativeLibid - The referenced VBA project's identifier with an relative path.public void copy(VbaProjectReferenceCollection source)
source - The source references.See 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.