ExcelをHTMLに変換する際、PresentationPreferenceオプションを使用してレイアウトを向上させる

Contents
[ ]

以下に、Excelレポートからレイアウト向上設定を使用してHTMLファイルをレンダリングする方法を示すサンプルコードをご覧ください。

from aspose.cells import HtmlSaveOptions, 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(".")
# Instantiate the Workbook
# Load an Excel file
workbook = Workbook(dataDir + "sample.xlsx")
# Create HtmlSaveOptions object
options = HtmlSaveOptions()
# Set the Presenation preference option
options.presentation_preference = True
# Save the Excel file to HTML with specified option
workbook.save(dataDir + "outPresentationlayout1.out.html", options)