Excel den HTML ye Daha İyi Düzen İçin Presentasyon Tercihi Seçeneğini Kullanın
Contents
[
Hide
]
Aspose.Cells for Python via .NET, daha iyi düzen düzeni sunmak için {0} HtmlSaveOptions.PresentationPreference özelliğini sağlar. Varsayılan değer false‘tur. Bu özelliği true yapmanızı öneririz, böylece Excel raporlarının daha çekici bir sunumu elde edilir.
Lütfen aşağıdaki örnek kodu inceleyin, bu kod Excel raporundan HTML dosyasını nasıl presentasyon tercihi ile oluşturduğunu gösterir.
This file contains hidden or 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
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) |