見出しを含めてExcelをHTMLに変換する
Contents
[
Hide
]
見出しを使用したExcelからHTMLへの変換
Aspose.Cellsは、ExcelをHTMLに変換する際に見出しをエクスポートするオプションを提供しています。これには、HtmlSaveOptions.ExportHeadingsプロパティを true に設定する必要があります。HtmlSaveOptions.ExportHeadings プロパティのデフォルト値は false です。以下に、このコードで生成された出力ファイルを示します。
サンプルコード
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// Load the Excel file. | |
Workbook workbook = new Workbook(sourceDir + "Book1.xlsx"); | |
// Initialize HtmlSaveOptions | |
HtmlSaveOptions options = new HtmlSaveOptions(); | |
options.setExportHeadings(true); | |
//Save to HTML format | |
workbook.save(outputDir + "PrintHeadings_out.html", options); |