public class FontSetting
extends java.lang.Object
Example
//Instantiating a Workbook object
Workbook workbook = new 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 worksheet = workbook.getWorksheets().get(0);
//Accessing the "A1" cell from the worksheet
Cell cell = worksheet.getCells().get("A1");
//Adding some value to the "A1" cell
cell.putValue("Visit Aspose!");
//getting charactor
FontSetting 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 and Description |
|---|
FontSetting(int startIndex,
int length,
WorksheetCollection sheets) |
| Modifier and Type | Method and Description |
|---|---|
Font |
getFont()
Returns the font of this object.
|
int |
getLength()
Gets the length of the characters.
|
int |
getStartIndex()
Gets the start index of the characters.
|
TextOptions |
getTextOptions()
Returns the text options.
|
int |
getType()
Gets the type of text node.
|
void |
setWordArtStyle(int style)
Sets the preset WordArt style.
|
public FontSetting(int startIndex,
int length,
WorksheetCollection sheets)
startIndex - length - sheets - public int getType()
See TextNodeType.
public int getStartIndex()
public int getLength()
public Font getFont()
public void setWordArtStyle(int style)
Remarks
Only for the text of shape/chart.style - PresetWordArtStyle. The preset WordArt style.public TextOptions getTextOptions()
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.