Excel を見出し付きの HTML に変換する
Contents
[
Hide
]
Excel を見出し付きの HTML に変換する
Aspose.Cells は、Excel を HTML に変換する際に、行と列の見出しをエクスポートするオプションを提供します。HtmlSaveOptions.ExportHeadingsAPI によって提供されるプロパティ。HtmlSaveOptions.ExportHeadingsは間違い .パス真実出力 HTML ファイルの見出しをレンダリングするパラメーターとして。次の図は、次のコードによって生成された出力ファイルを示しています。
次のサンプル コードは、HtmlSaveOptions.ExportHeadings出力 HTML ファイルの見出しをレンダリングするプロパティ。
サンプルコード
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) |