将Excel文件导出为HTML时从右向左扩展文本

在将Excel文件导出为HTML时,将文本从右向左扩展

下面的示例代码将sample excel file转换成HTML。这张截图展示了示例 Excel 在 Microsoft Excel 2013 中的样子。

todo:image_alt_text

这张截图展示了使用较旧版本生成的output HTML

todo:image_alt_text

这张截图展示了使用更新版本生成的output HTML

todo:image_alt_text

正如您在屏幕截图中所看到的,新版本正确地将右对齐的文本向左扩展,就像Microsoft Excel一样。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Load source excel file inside the workbook object
Workbook wb = new Workbook(dataDir + "sample.xlsx");
// Save workbook in html format
wb.Save(dataDir + "ExpandTextFromRightToLeft_out_" + CellsHelper.GetVersion() + ".html", SaveFormat.Html);