FontSetting klass
FontSetting klass
Representerar ett teckenintervall i celltexten.
Typen FontSetting avslöjar följande medlemmar:
Konstruktörer
Konstruktör | Beskrivning |
---|
init | |
Egenskaper
Fast egendom | Beskrivning |
---|
type | Hämtar typen av textnod. |
start_index | Hämtar startindex för tecknen. |
length | Får längden på karaktärerna. |
font | Returnerar teckensnittet för detta objekt. |
text_options | Returnerar textalternativen. |
Metoder
Exempel
from aspose.cells import Workbook
from aspose.pydrawing import Color
# Instantiating a Workbook object
workbook = Workbook()
# Adding a new worksheet to the Excel object
workbook.worksheets.add()
# Obtaining the reference of the newly added worksheet by passing its sheet index
worksheet = workbook.worksheets[0]
# Accessing the "A1" cell from the worksheet
cell = worksheet.cells.get("A1")
# Adding some value to the "A1" cell
cell.put_value("Visit Aspose!")
# getting charactor
charactor = cell.characters(6, 7)
# Setting the font of selected characters to bold
charactor.font.is_bold = True
# Setting the font color of selected characters to blue
charactor.font.color = Color.blue
# Saving the Excel file
workbook.save("book1.xls")
Se även