HTML kullanarak Hücre Değeri Ayarıyla Madde İmleri Göster
Contents
[
Hide
]
Aspose.Cells, HTML kodu ile işaretli listeleri göstermeyi destekler. Bu makale, hücre değerini HTML kullanarak işaretli listeleri görüntülemeyi açıklayacaktır. Hücre değerini HTML ile ayarlamak için Cell.html_string özelliğini kullanacağız.
HTML kullanarak Hücre değerini ayarlayarak işaretleri göstermek için Python kodu
Aşağıdaki kod, hücre değerini ayarlamak için HTML kodunu kullanır. Bu kodu çalıştırdığınızda, aşağıdaki resimde gösterildiği gibi çıktı alırsınız.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(".") | |
# Create workbook object | |
workbook = Workbook() | |
# Access first worksheet | |
worksheet = workbook.worksheets[0] | |
# Access cell A1 | |
cell = worksheet.cells.get("A1") | |
# Set the HTML string | |
cell.html_string = "<font style='font-family:Arial;font-size:10pt;color:#666666;vertical-align:top;text-align:left;'>Text 1 </font><font style='font-family:Wingdings;font-size:8.0pt;color:#009DD9;mso-font-charset:2;'>l</font><font style='font-family:Arial;font-size:10pt;color:#666666;vertical-align:top;text-align:left;'> Text 2 </font><font style='font-family:Wingdings;font-size:8.0pt;color:#009DD9;mso-font-charset:2;'>l</font><font style='font-family:Arial;font-size:10pt;color:#666666;vertical-align:top;text-align:left;'> Text 3 </font><font style='font-family:Wingdings;font-size:8.0pt;color:#009DD9;mso-font-charset:2;'>l</font><font style='font-family:Arial;font-size:10pt;color:#666666;vertical-align:top;text-align:left;'> Text 4 </font>" | |
# Auto fit the Columns | |
worksheet.auto_fit_columns() | |
# Save the workbook | |
workbook.save(dataDir + "BulletsInCells_out.xlsx") |
Örneğin ürettiği çıktı
Yukarıdaki örnek kodun çıktısını aşağıdaki ekran görüntüsünde görebilirsiniz.