Excel から HTML - レイアウトを改善するには、PresentationPreference オプションを使用してください
Contents
[
Hide
]
Aspose.Cells は便利なプロパティを提供します。HtmlSaveOptions.PresentationPreference 、開発者が Microsoft Excel ファイルを HTML または MHT 形式で保存するときに、レイアウトを改善するために使用できます。プロパティのデフォルト値は間違い.このプロパティを次のように設定することをお勧めします真実Excel レポートから見栄えの良いプレゼンテーションを取得します。
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 | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(ExceltoHTMLPresentationPreferenceOption.class); | |
// Instantiate the Workbook | |
// Load an Excel file | |
Workbook workbook = new Workbook(dataDir + "HiddenCol.xlsx"); | |
// Create HtmlSaveOptions object | |
HtmlSaveOptions options = new HtmlSaveOptions(); | |
// Set the Presenation preference option | |
options.setPresentationPreference(true); | |
// Save the Excel file to HTML with specified option | |
workbook.save(dataDir + "outPresentationlayout1.html"); |
Excel から HTML への変換に関する次の記事が役立つ場合があります。