Excel'i başlıklarla HTML'e dönüştürün
Contents
[
Hide
]
Excel’i başlıklarla HTML’e dönüştürün
Aspose.Cells, Excel’i HTML’e dönüştürürken satır ve sütun başlıklarını dışa aktarma seçeneği sunar. Bu,HtmlSaveOptions.ExportHeadingsAPI tarafından sağlanan özellik. Varsayılan değerHtmlSaveOptions.ExportHeadings dır-dirYANLIŞ . GeçmekDoğru HTML çıktı dosyasında başlıkları işlemek için parametre olarak. Aşağıdaki görüntü, aşağıdaki kod tarafından oluşturulan çıktı dosyasını gösterir.
Aşağıdaki örnek kod,HtmlSaveOptions.ExportHeadingsçıktı HTML dosyasındaki başlıkları işleme özelliği.
Basit kod
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
# Load the Sample Workbook | |
workbook = Workbook() | |
# Access first worksheet | |
worksheet = workbook.getWorksheets().get(0) | |
# Access cell A1 and put some text inside it. | |
cell = worksheet.getCells().get("A1") | |
cell.putValue("This is some text.") | |
# Get the Normal and Html5 strings. | |
strNormal = cell.getHtmlString(False) | |
strHtml5 = cell.getHtmlString(True) | |
# Print the Normal and Html5 strings | |
print("Normal:\r\n" + strNormal) | |
print("Html5:\r\n" + strHtml5) |