Hücre İçine HTML Zengin Metin Ekleme
Aspose.Cells for Python via .NET Microsoft Excel odaklı HTML’i XLS/XLSX biçimine dönüştürmeyi destekler. Bu, Microsoft Excel tarafından oluşturulan HTML’nin Aspose.Cells for Python via .NET kullanılarak XLS/XLSX biçimine dönüştürülebileceği anlamına gelir.
Benzer şekilde, Aspose.Cells for Python via .NET basit HTML olduğunda HTML Zengin Metin' e dönüştürebilir. Aspose.Cells for Python via .NET, bu tür basit HTML’yi alabilir ve biçimlendirilmiş hücre metnine dönüştürebilen Cell.html_string özelliğini sağlar.
Aşağıdaki kod örneği, hücre içine HTML zengin metin eklemenin nasıl yapıldığını gösterir. Lütfen çıktı Excel dosyasının ekran görüntüsüne bakın.
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") |