HTMLへのサポートされていないボーダースタイルを持つExcel
HTMLへのサポートされていないボーダースタイルを持つExcel
Microsoft ExcelはWebブラウザーでサポートされていない一部の点線ボーダーをサポートしています。そのようなファイルをAspose.Cellsを使用してHTMLに変換すると、それらのボーダーが削除されます。ただし、Aspose.Cells for Python via JavaはHtmlSaveOptions.ExportSimilarBorderStyleプロパティで同様のボーダーを表示するサポートを提供しています。HtmlSaveOptions.ExportSimilarBorderStyleプロパティの値をTrueに設定すると、サポートされていないボーダーがエクスポートされます。
以下のサンプルコードは、次のスクリーンショットに示すように、いくつかのサポートされていないボーダーを含むsample Excel fileをロードします。スクリーンショットはまた、output HTML内のHtmlSaveOptions.ExportSimilarBorderStyleプロパティの効果を説明しています。
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) |