Aspose::Cells::Vba::VbaProjectReference class
Contents
[
Hide
]VbaProjectReference class
Represents the reference of VBA project.
class VbaProjectReference
Methods
Method | Description |
---|---|
Copy(const VbaProjectReference& source) | |
GetExtendedLibid() | Gets and sets the extended Libid of the reference. |
GetLibid() | Gets and sets the Libid of the reference. |
GetName() | Gets and sets the name of the reference. |
GetRelativeLibid() | Gets and sets the referenced VBA project’s identifier with an relative path. |
GetTwiddledlibid() | Gets and sets the twiddled Libid of the reference. |
GetType() | Gets the type of this reference. |
IsNull() const | Checks whether the implementation object is nullptr. |
explicit operator bool() const | operator bool() |
operator=(const VbaProjectReference& src) | operator= |
SetExtendedLibid(const U16String& value) | Gets and sets the extended Libid of the reference. |
SetExtendedLibid(const char16_t* value) | Gets and sets the extended Libid of the reference. |
SetLibid(const U16String& value) | Gets and sets the Libid of the reference. |
SetLibid(const char16_t* value) | Gets and sets the Libid of the reference. |
SetName(const U16String& value) | Gets and sets the name of the reference. |
SetName(const char16_t* value) | Gets and sets the name of the reference. |
SetRelativeLibid(const U16String& value) | Gets and sets the referenced VBA project’s identifier with an relative path. |
SetRelativeLibid(const char16_t* value) | Gets and sets the referenced VBA project’s identifier with an relative path. |
SetTwiddledlibid(const U16String& value) | Gets and sets the twiddled Libid of the reference. |
SetTwiddledlibid(const char16_t* value) | Gets and sets the twiddled Libid of the reference. |
VbaProjectReference(VbaProjectReference_Impl* impl) | Constructs from an implementation object. |
VbaProjectReference(const VbaProjectReference& src) | Copy constructor. |
~VbaProjectReference() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
Examples
Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;
// Init VBA project.
VbaProject vbaProject = workbook.GetVbaProject();
// Add vba project reference
vbaProject.GetReferences().AddRegisteredReference(u"stdole", u"*\\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\\Windows\\system32\\stdole2.tlb#OLE Automation");
//Saving the Excel file
workbook.Save(u"book1.xlsm");
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells::Vba
- Library Aspose.Cells for C++