Agregar texto enriquecido HTML dentro de la celda

El siguiente ejemplo de código le muestra cómo agregar texto enriquecido HTML dentro de la celda. Por favor vea la captura de pantalla del archivo de Excel de salida.

todo:image_alt_text

from aspose.cells import Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
workbook = Workbook()
worksheet = workbook.worksheets[0]
cell = worksheet.cells.get("A1")
cell.html_string = "<Font Style=\"FONT-WEIGHT: bold;FONT-STYLE: italic;TEXT-DECORATION: underline;FONT-FAMILY: Arial;FONT-SIZE: 11pt;COLOR: #ff0000;\">This is simple HTML formatted text.</Font>"
workbook.save(dataDir + "output_out.xlsx")

Artículos relacionados