Expanding text from right to left while exporting Excel file to HTML
Expanding text from right to left while exporting Excel file to HTML
The following sample code converts the sample excel file into HTML. This screenshot shows how the sample excel looks like in Microsoft Excel 2013.
This screenshot shows the output HTML generated with older version.
This screenshot shows the output HTML generated with newer version.
As you can see in the screenshots, the newer version expands the right-aligned text to left correctly just like Microsoft Excel.
from aspose.cells import CellsHelper, SaveFormat, 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(".") | |
# Load source excel file inside the workbook object | |
wb = Workbook(dataDir + "sample.xlsx") | |
# Save workbook in html format | |
wb.save(dataDir + "ExpandTextFromRightToLeft_out_" + CellsHelper.get_version() + ".html", SaveFormat.HTML) |