Excel med kantstil som inte stöds till HTML
Contents
[
Hide
]
Excel med kantstil som inte stöds till HTML
Microsoft Excel stöder någon typ av streckade kanter som inte stöds av webbläsare. När sådana filer konverteras till HTML med Aspose.Cells tas dessa gränser bort. Aspose.Cells for Python via Java stöder dock visning av liknande ramar medHtmlSaveOptions.ExportSimilarBorderStylefast egendom. Du kan ställa in värdet påHtmlSaveOptions.ExportSimilarBorderStyle egendom tillSann att exportera gränser som inte stöds.
Följande exempelkod laddarexempel på Excel-filsom innehåller några gränser som inte stöds som visas i följande skärmdump. Skärmdumpen illustrerar ytterligare effekten avHtmlSaveOptions.ExportSimilarBorderStyleegendom inutiutgång HTML.
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
source_directory = "Examples/SampleFiles/SourceDirectory/" | |
output_directory = "Examples/SampleFiles/OutputDirectory/" | |
# Load the Sample Workbook | |
workbook = Workbook(source_directory + "sampleExportSimilarBorderStyle.xlsx") | |
# Initialize HtmlSaveOptions | |
saveOptions = HtmlSaveOptions() | |
saveOptions.setExportSimilarBorderStyle(True) | |
# Save the excel file. | |
workbook.save(output_directory + "outputExportSimilarBorderStyle.html", saveOptions) |