Export similar Border Style when Border Style is not supported by Web Browsers
Contents
[
Hide
]
Possible Usage Scenarios
Microsoft Excel supports some type of dashed borders which are not supported by Web Browsers. When you convert such an Excel file into HTML using Aspose.Cells, such borders are removed. However, Aspose.Cells can also support to display such borders with HtmlSaveOptions.ExportSimilarBorderStyle property. Please set its value as true and the unsupported borders will also be exported to HTML file.
Export similar Border Style when Border Style is not supported by Web Browsers
The following sample code loads the sample Excel file that contains some unsupported borders as shown in the following screenshot. The screenshot further illustrates the effect of HtmlSaveOptions.ExportSimilarBorderStyle property inside the output HTML.
Sample Code
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Load the sample Excel file | |
Workbook wb = new Workbook("sampleExportSimilarBorderStyle.xlsx"); | |
//Specify Html Save Options - Export Similar Border Style | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.ExportSimilarBorderStyle = true; | |
//Save the workbook in Html format with specified Html Save Options | |
wb.Save("outputExportSimilarBorderStyle.html", opts); |