Excel to HTML - Use PresentationPreference Option for Better Layout

Contents
[ ]

Please see the sample code below that demonstrates how to render an HTML file from Excel report with presentation preference on.

from aspose.cells import HtmlSaveOptions, Workbook
# The path to the documents directory.
dataDir = "./"
# 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)