java.lang.Object
CollectionBase
com.aspose.cells.VbaModuleCollection
- All Implemented Interfaces:
- java.lang.Iterable
public class VbaModuleCollection
- extends CollectionBase
Represents the list of VbaModuleExample:
//Instantiating a Workbook object
Workbook workbook = new Workbook();
// Init VBA project.
VbaProject vbaProject = workbook.getVbaProject();
// Add a new module.
vbaProject.getModules().add(VbaModuleType.CLASS, "test");
//Saving the Excel file
workbook.save("C:\\book1.xlsm");
Method Summary |
int | add(Worksheet sheet) | |
Adds module for a worksheet.
|
int | add(int type, java.lang.String name) | |
Adds module.
|
int | add(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
void | addDesignerStorage(java.lang.String name, byte[] data) | |
|
void | clear() | → inherited from com.aspose.cells.CollectionBase
|
|
boolean | contains(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
byte[] | getDesignerStorage(java.lang.String name) | |
Represents the data of Designer.
|
int | indexOf(java.lang.Object value) | → inherited from com.aspose.cells.CollectionBase
|
Reserved for internal use. |
java.util.Iterator | iterator() | → inherited from com.aspose.cells.CollectionBase
|
|
void | remove(Worksheet sheet) | |
Removes module for a worksheet.
|
void | remove(java.lang.String name) | |
Remove the module by the name
|
void | removeAt(int index) | → inherited from com.aspose.cells.CollectionBase
|
|
Property Getters/Setters Detail |
getCount | → inherited from com.aspose.cells.CollectionBase
|
public int getCount()
|
-
-
Gets VbaModule in the list by the index.
- Parameters:
index
- The index.
- Returns:
get | |
public VbaModule get(java.lang.String name)
|
-
Gets VbaModule in the list by the name.
- Parameters:
name
- The name of module.
- Returns:
addDesignerStorage | |
public void addDesignerStorage(java.lang.String name, byte[] data)
throws java.lang.Exception |
- Parameters:
name
- data
-
getDesignerStorage | |
public byte[] getDesignerStorage(java.lang.String name)
throws java.lang.Exception |
-
Represents the data of Designer.
We do not support to parse them. Just only for copying.
-
Adds module for a worksheet.
- Parameters:
sheet
- The worksheet
- Returns:
add | |
public int add(int type, java.lang.String name) |
-
Adds module.
- Parameters:
type
- A VbaModuleType value. The type of module.name
- The name of module.
- Returns:
-
Removes module for a worksheet.
- Parameters:
sheet
- The worksheet
- Returns:
remove | |
public void remove(java.lang.String name) |
-
Remove the module by the name
- Parameters:
name
-
clear | → inherited from com.aspose.cells.CollectionBase
|
public void clear() |
-
removeAt | → inherited from com.aspose.cells.CollectionBase
|
public void removeAt(int index) |
-
iterator | → inherited from com.aspose.cells.CollectionBase
|
public java.util.Iterator iterator() |
-
contains | → inherited from com.aspose.cells.CollectionBase
|
public boolean contains(java.lang.Object value) |
- Reserved for internal use.
add | → inherited from com.aspose.cells.CollectionBase
|
public int add(java.lang.Object value) |
- Reserved for internal use.
indexOf | → inherited from com.aspose.cells.CollectionBase
|
public int indexOf(java.lang.Object value) |
- Reserved for internal use.
See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.