Example:
# Instantiating a Workbook object workbook = Workbook() # Adding a new worksheet to the Excel object workbook.getWorksheets().add() # Obtaining the reference of the newly added worksheet by passing its sheet index worksheet = workbook.getWorksheets().get(0) # Accessing the "A1" cell from the worksheet cell = worksheet.getCells().get("A1") # Adding some value to the "A1" cell cell.putValue("Visit Aspose!") # getting charactor charactor = cell.characters(6, 7) # Setting the font of selected characters to bold charactor.getFont().setBold(True) # Setting the font color of selected characters to blue charactor.getFont().setColor(Color.getBlue()) # Saving the Excel file workbook.save("Book1.xls")
Constructor Summary |
---|
FontSetting(startIndex, length, sheets)
|
Property Getters/Setters Summary | ||
---|---|---|
method | getFont() | |
Returns the font of this object.
|
||
method | getLength() | |
Gets the length of the characters.
|
||
method | getStartIndex() | |
Gets the start index of the characters.
|
||
method | getTextOptions() | |
Returns the text options.
|
||
method | getType() | |
Gets the type of text node.
The value of the property is TextNodeType integer constant. |
Method Summary | ||
---|---|---|
method | setWordArtStyle(style) | |
Sets the preset WordArt style.
|
FontSetting(startIndex, length, sheets)
startIndex: int
- length: int
- sheets: WorksheetCollection
- int getType()
int getStartIndex()
int getLength()
TextOptions getTextOptions()
setWordArtStyle(style)
style: int
- A